#include <WRegExpValidator>
Public Member Functions | |
WRegExpValidator (const boost::regex &rx) | |
Create a new regular expression validator that accepts input that matches the given regular expression (in UTF8 encoding). | |
WRegExpValidator (const WString &expr) | |
Create a new regular expression validator that accepts input that matches the given perl regular expression. | |
~WRegExpValidator () | |
Delete the regexp validator. | |
const boost::regex & | regExp () const |
Return the regular expression for matching. | |
void | setNoMatchText (const WString &text) |
Set message to display when the input does not match. | |
virtual State | validate (WString &input, int &pos) const |
Validate the to match the regular expression. | |
virtual void | createExtConfig (std::ostream &config) const |
Provide Ext-compatible config options for client-side validation. |
This validator checks whether user input is matched by the given regular expression.
Wt::WRegExpValidator::WRegExpValidator | ( | const boost::regex & | rx | ) |
Create a new regular expression validator that accepts input that matches the given regular expression (in UTF8 encoding).
Deprecated. Consider using WRegExpValidator(const WString&) which is available on all platforms (including WIN32).
Wt::WRegExpValidator::WRegExpValidator | ( | const WString & | expr | ) |
Create a new regular expression validator that accepts input that matches the given perl regular expression.
TODO: provide a nice subset of the options provided by boost::regex.