CppCMS
Public Member Functions
cppcms::widgets::regex_field Class Reference

This class is extending a simple text widget by using additional regular expression validation. More...

#include <cppcms/form.h>

Inheritance diagram for cppcms::widgets::regex_field:
cppcms::widgets::text cppcms::widgets::base_html_input cppcms::widgets::base_text cppcms::widgets::base_widget cppcms::widgets::base_widget cppcms::base_form booster::noncopyable cppcms::base_form booster::noncopyable cppcms::form_flags cppcms::form_flags cppcms::widgets::email

List of all members.

Public Member Functions

 regex_field (booster::regex const &e)
 regex_field (std::string const &e)
void regex (booster::regex const &e)
virtual bool validate ()

Detailed Description

This class is extending a simple text widget by using additional regular expression validation.


Constructor & Destructor Documentation

cppcms::widgets::regex_field::regex_field ( booster::regex const &  e)

Create a widget using the regular expression e.

cppcms::widgets::regex_field::regex_field ( std::string const &  e)

Create a widget using the regular expression e.


Member Function Documentation

Set the regular expression.

virtual bool cppcms::widgets::regex_field::validate ( ) [virtual]

Validate the widget content according to the rules and to the charset encoding.

Notes:

  • The charset validation is very efficient for variable length UTF-8 encoding as well as for most popular fixed length encodings like ISO-8859-*, windows-125* and koi8*. For other encodings, character set conversion is used for the actual validation.
  • Special characters (that are not allowed in HTML) are assumed to be forbidden, even if they are valid code points (like NUL = 0 or DEL=127).

Reimplemented from cppcms::widgets::base_text.


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