DateValidator Class Reference
[Form example]

A validator that accepts dates. More...

#include <DateValidator.h>

Inherits Wt::WRegExpValidator.

List of all members.

Public Member Functions

 DateValidator (const boost::gregorian::date &bottom, const boost::gregorian::date &top)
 Construct a date validator.
virtual State validate (WString &input) const

Private Attributes

boost::gregorian::date bottom_
boost::gregorian::date top_

Detailed Description

A validator that accepts dates.

This example validator only accepts input in the dd/mm/yyyy format, and checks that the date is in the right range.

It would be a natural thing to extend this class to provide access to the parsed date as a boost::gregorian::date object for example.

This class is part of the Wt form example.

Definition at line 33 of file DateValidator.h.


Constructor & Destructor Documentation

DateValidator::DateValidator ( const boost::gregorian::date &  bottom,
const boost::gregorian::date &  top 
)

Construct a date validator.

The validator will accept only dates in the indicated range.


Member Function Documentation

virtual State DateValidator::validate ( WString input  )  const [virtual]

Reimplemented from Wt::WRegExpValidator.


Member Data Documentation

boost::gregorian::date DateValidator::bottom_ [private]

Definition at line 50 of file DateValidator.h.

boost::gregorian::date DateValidator::top_ [private]

Definition at line 50 of file DateValidator.h.


The documentation for this class was generated from the following file:

Generated on Thu May 13 05:16:01 2010 for Wt by doxygen 1.6.3