#include <WLengthValidator>
Public Member Functions | |
WLengthValidator (int minLength=0, int maxLength=std::numeric_limits< int >::min()) | |
Create a new validator. | |
double | minimumLength () const |
Return the minimum length. | |
void | setMinimumLength (int minimum) |
Set the minimum length. | |
void | setInvalidTooShortText (const WString &text) |
Set message to display when the input is too short. | |
double | maximumLength () const |
Return the maximum length. | |
void | setMaximumLength (int maximum) |
Set the maximum length. | |
void | setInvalidTooLongText (const WString &text) |
Set message to display when the input is too long. | |
virtual State | validate (WString &input, int &pos) const |
Validate the input as an double within the given range. | |
virtual void | createExtConfig (std::ostream &config) const |
Provide Ext-compatible config options for client-side validation. |
This validator checks whether user input is within the specified range of accepted string lengths
WValidator::State Wt::WLengthValidator::validate | ( | WString & | input, | |
int & | pos | |||
) | const [virtual] |
Validate the input as an double within the given range.
Returns Valid if the input is an double in the given range. Returns Invalid if the input is not an double, or outside of the given range.
Reimplemented from Wt::WValidator.