
#ifndef WTIME_VALIDATOR_H_
#define WTIME_VALIDATOR_H_

#include "Wt/WRegExpValidator"

namespace Wt {

/*! \class WTimeValidator Wt/WTimeValidator Wt/WTimeValidator
 *  \brief A time validator
 *
 *  \sa WTimeEdit
 *  \sa WTime
 *  \sa WTimePicker
 *
 */
class WT_API WTimeValidator : public WRegExpValidator
{
public:
	/*! \brief Creates a new WTimeValidator
	 */
    WTimeValidator(WObject *parent = 0);

	/*! \brief Creates a new WTimeValidator
	 */
    WTimeValidator(const WT_USTRING &format, WObject *parent = 0);

	/*! \brief sets the validator format
	 * \sa WTime::toString()
	 */
    void setFormat(const WT_USTRING &format);

	/*! \brief Returns the Validator current format
	 */
    virtual WT_USTRING format() const { return format_; }


private:

    WT_USTRING format_;

};

}

#endif // WTIME_VALIDATOR_H_
