<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::WValidator Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="classWt_1_1WValidator.html">WValidator</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#pub-types">Public Types</a> | <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::WValidator Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::WValidator" --><!-- doxytag: inherits="Wt::WObject" --> <p>A validator is used to validate user input according to pre-defined rules. <a href="classWt_1_1WValidator.html#details">More...</a></p> <p><code>#include <Wt/WValidator></code></p> <div class="dynheader"> Inheritance diagram for Wt::WValidator:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1WValidator__inherit__graph.png" border="0" usemap="#Wt_1_1WValidator_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1WValidator_inherit__map" id="Wt_1_1WValidator_inherit__map"> <area shape="rect" href="classWt_1_1Auth_1_1AbstractPasswordService_1_1AbstractStrengthValidator.html" title="Validator for password strength." alt="" coords="311,5,695,32"/><area shape="rect" href="classWt_1_1WDateValidator.html" title="A validator for date input." alt="" coords="435,56,571,83"/><area shape="rect" href="classWt_1_1WDoubleValidator.html" title="A validator for validating floating point user input." alt="" coords="428,107,577,133"/><area shape="rect" href="classWt_1_1WIntValidator.html" title="A validator that validates integer user input." alt="" coords="441,157,564,184"/><area shape="rect" href="classWt_1_1WLengthValidator.html" title="A validator that checks the string length of user input." alt="" coords="429,208,576,235"/><area shape="rect" href="classWt_1_1WRegExpValidator.html" title="A validator that checks user input against a regular expression." alt="" coords="425,259,580,285"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="7,132,103,159"/><area shape="rect" href="classWt_1_1Auth_1_1PasswordStrengthValidator.html" title="A default implementation for password strength validation." alt="" coords="744,5,981,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1WValidator-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator_1_1Result.html">Result</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A class that holds a validation result. <a href="classWt_1_1WValidator_1_1Result.html#details">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-types"></a> Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3">State</a> { <a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3aa5bf750faac5f1ca6fb58c8de97bac51">Invalid</a>, <a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3a5e6ab5b841b3066a2d228b9ce7f4f447">InvalidEmpty</a>, <a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3a1bc2acb7589ab9e3050867ebfc32dda3">Valid</a> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The state in which validated input can exist. <a href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81e355ed7c38c9e5de934d3994b3905c"></a><!-- doxytag: member="Wt::WValidator::WValidator" ref="a81e355ed7c38c9e5de934d3994b3905c" args="(WObject *parent=0)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a81e355ed7c38c9e5de934d3994b3905c">WValidator</a> (<a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new validator. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a4c4a0b7bcb4c543812b1500c748ab99b">WValidator</a> (bool mandatory, <a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new validator. <a href="#a4c4a0b7bcb4c543812b1500c748ab99b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#ad7f5599879175c310dac4b76331d7ff6">~WValidator</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ad7f5599879175c310dac4b76331d7ff6"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a6f7993c51a0088b927d7c9aa516efabb">setMandatory</a> (bool how)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets if input is mandatory. <a href="#a6f7993c51a0088b927d7c9aa516efabb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8de913a10b24231264de5cc082c0d2fd"></a><!-- doxytag: member="Wt::WValidator::isMandatory" ref="a8de913a10b24231264de5cc082c0d2fd" args="() const " --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a8de913a10b24231264de5cc082c0d2fd">isMandatory</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns if input is mandatory. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#abafa7c49159d5475a8ec6eff1fef8c17">setInvalidBlankText</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &text)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the message to display when a mandatory field is left blank. <a href="#abafa7c49159d5475a8ec6eff1fef8c17"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WString.html">WString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a3518bfa063c9155c99e5ca3990465d35">invalidBlankText</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the message displayed when a mandatory field is left blank. <a href="#a3518bfa063c9155c99e5ca3990465d35"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a8766794c9600455d35cafb1bd9af1eb9">fixup</a> (<a class="el" href="classWt_1_1WString.html">WString</a> &input) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This function attempts to change input to be valid according to the validator's rules. <a href="#a8766794c9600455d35cafb1bd9af1eb9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classWt_1_1WValidator_1_1Result.html">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a78808215d68944dedca11ff8889374ed">validate</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &input) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Validates the given input. <a href="#a78808215d68944dedca11ff8889374ed"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acabfaf05f2346019f3f18f6c299bb384"></a><!-- doxytag: member="Wt::WValidator::createExtConfig" ref="acabfaf05f2346019f3f18f6c299bb384" args="(std::ostream &config) const " --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#acabfaf05f2346019f3f18f6c299bb384">createExtConfig</a> (std::ostream &config) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides Ext-compatible config options for client-side validation. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a2aca1c34abaf4a35b972c3cf82ce1e48">javaScriptValidate</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a Javascript object that validates the input. <a href="#a2aca1c34abaf4a35b972c3cf82ce1e48"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WValidator.html#a1ca29b7eaabf4c1655200ec382a84554">inputFilter</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a regular expression that filters input. <a href="#a1ca29b7eaabf4c1655200ec382a84554"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A validator is used to validate user input according to pre-defined rules. </p> <p>A validator may be associated with a form widget using <a class="el" href="classWt_1_1WFormWidget.html#aa773d16013d6959149ce5081e84b259c" title="Sets a validator for this field.">WFormWidget::setValidator()</a>.</p> <p>The validator validates the user input. A validator may have a split implementation to provide both validation at the client-side (which gives instant feed-back to the user while editing), and server-side validation (to be sure that the client was not tampered with). The feed-back given by (client-side and server-side) validation is reflected in the style class of the form field: a style class of <code>Wt-invalid</code> is set for a field that is invalid.</p> <p>This WValidator only checks that mandatory fields are not empty. This class is reimplemented in <a class="el" href="classWt_1_1WDateValidator.html" title="A validator for date input.">WDateValidator</a>, <a class="el" href="classWt_1_1WIntValidator.html" title="A validator that validates integer user input.">WIntValidator</a>, <a class="el" href="classWt_1_1WDoubleValidator.html" title="A validator for validating floating point user input.">WDoubleValidator</a>, <a class="el" href="classWt_1_1WLengthValidator.html" title="A validator that checks the string length of user input.">WLengthValidator</a> and <a class="el" href="classWt_1_1WRegExpValidator.html" title="A validator that checks user input against a regular expression.">WRegExpValidator</a>. All these validators provibe both client-side and server-side validation.</p> <p>If these validators are not suitable, you can inherit from this class, and provide a suitable implementation to <a class="el" href="classWt_1_1WValidator.html#a78808215d68944dedca11ff8889374ed" title="Validates the given input.">validate()</a> which does the server-side validation. If you want to provide client-side validation for your own validator, you may also reimplement <a class="el" href="classWt_1_1WValidator.html#a2aca1c34abaf4a35b972c3cf82ce1e48" title="Creates a Javascript object that validates the input.">javaScriptValidate()</a>.</p> <h3>i18n</h3> <p>The strings used in this class can be translated by overriding the default values for the following localization keys:</p> <ul> <li><a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3aa5bf750faac5f1ca6fb58c8de97bac51" title="The input is invalid.">Wt.WValidator.Invalid</a>: This field cannot be empty</li> </ul> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element.">WFormWidget</a> </dd></dl> </div><hr/><h2>Member Enumeration Documentation</h2> <a class="anchor" id="a638a1feefca259ea2f806a8add2d18a3"></a><!-- doxytag: member="Wt::WValidator::State" ref="a638a1feefca259ea2f806a8add2d18a3" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classWt_1_1WValidator.html#a638a1feefca259ea2f806a8add2d18a3">Wt::WValidator::State</a></td> </tr> </table> </div> <div class="memdoc"> <p>The state in which validated input can exist. </p> <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" id="a638a1feefca259ea2f806a8add2d18a3aa5bf750faac5f1ca6fb58c8de97bac51"></a><!-- doxytag: member="Invalid" ref="a638a1feefca259ea2f806a8add2d18a3aa5bf750faac5f1ca6fb58c8de97bac51" args="" -->Invalid</em> </td><td> <p>The input is invalid. </p> </td></tr> <tr><td valign="top"><em><a class="anchor" id="a638a1feefca259ea2f806a8add2d18a3a5e6ab5b841b3066a2d228b9ce7f4f447"></a><!-- doxytag: member="InvalidEmpty" ref="a638a1feefca259ea2f806a8add2d18a3a5e6ab5b841b3066a2d228b9ce7f4f447" args="" -->InvalidEmpty</em> </td><td> <p>The input is invalid (empty and mandatory). </p> </td></tr> <tr><td valign="top"><em><a class="anchor" id="a638a1feefca259ea2f806a8add2d18a3a1bc2acb7589ab9e3050867ebfc32dda3"></a><!-- doxytag: member="Valid" ref="a638a1feefca259ea2f806a8add2d18a3a1bc2acb7589ab9e3050867ebfc32dda3" args="" -->Valid</em> </td><td> <p>The input is valid. </p> </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a4c4a0b7bcb4c543812b1500c748ab99b"></a><!-- doxytag: member="Wt::WValidator::WValidator" ref="a4c4a0b7bcb4c543812b1500c748ab99b" args="(bool mandatory, WObject *parent=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::WValidator::WValidator </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>mandatory</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classWt_1_1WObject.html">WObject</a> * </td> <td class="paramname"><em>parent</em> = <code>0</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new validator. </p> <p>Indicate whether input is mandatory.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WValidator.html#a6f7993c51a0088b927d7c9aa516efabb" title="Sets if input is mandatory.">setMandatory(bool)</a> </dd></dl> </div> </div> <a class="anchor" id="ad7f5599879175c310dac4b76331d7ff6"></a><!-- doxytag: member="Wt::WValidator::~WValidator" ref="ad7f5599879175c310dac4b76331d7ff6" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::WValidator::~WValidator </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Destructor. </p> <p>The validator automatically removes itself from all formfields to which it was associated. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a8766794c9600455d35cafb1bd9af1eb9"></a><!-- doxytag: member="Wt::WValidator::fixup" ref="a8766794c9600455d35cafb1bd9af1eb9" args="(WString &input) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WValidator::fixup </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>input</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>This function attempts to change input to be valid according to the validator's rules. </p> <p>In general the function needs not to change the input into a valid input. The default implementation does nothing. But it may help the user in getting its input right. </p> </div> </div> <a class="anchor" id="a1ca29b7eaabf4c1655200ec382a84554"></a><!-- doxytag: member="Wt::WValidator::inputFilter" ref="a1ca29b7eaabf4c1655200ec382a84554" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Wt::WValidator::inputFilter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a regular expression that filters input. </p> <p>The returned regular expression is used to filter keys presses. The regular expression should accept valid single characters.</p> <p>For details on valid regular expressions, see <a class="el" href="classWt_1_1WRegExpValidator.html" title="A validator that checks user input against a regular expression.">WRegExpValidator</a>. As an example, "[0-9]" would only accept numbers as valid input.</p> <p>The default implementation returns an empty string, which does not filter any input.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WValidator.html#a2aca1c34abaf4a35b972c3cf82ce1e48" title="Creates a Javascript object that validates the input.">javaScriptValidate()</a> </dd></dl> <p>Reimplemented in <a class="el" href="classWt_1_1WIntValidator.html#aaa26351e1a00502da10a9d67a7eea817">Wt::WIntValidator</a>.</p> </div> </div> <a class="anchor" id="a3518bfa063c9155c99e5ca3990465d35"></a><!-- doxytag: member="Wt::WValidator::invalidBlankText" ref="a3518bfa063c9155c99e5ca3990465d35" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WString.html">WString</a> Wt::WValidator::invalidBlankText </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the message displayed when a mandatory field is left blank. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WValidator.html#abafa7c49159d5475a8ec6eff1fef8c17" title="Sets the message to display when a mandatory field is left blank.">setInvalidBlankText(const WString&)</a> </dd></dl> </div> </div> <a class="anchor" id="a2aca1c34abaf4a35b972c3cf82ce1e48"></a><!-- doxytag: member="Wt::WValidator::javaScriptValidate" ref="a2aca1c34abaf4a35b972c3cf82ce1e48" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Wt::WValidator::javaScriptValidate </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a Javascript object that validates the input. </p> <p>The JavaScript expression should evaluate to an object which contains a <code>validate(text)</code> function, which returns an object that contains the following two fields:</p> <ul> <li>fields: a boolean <em>valid</em>,</li> <li>a <code>message</code> that indicates the problem if not valid.</li> </ul> <p>Returns an empty string if the validator does not provide a client-side validation implementationq.</p> <dl class="note"><dt><b>Note:</b></dt><dd>The signature and contract changed changed in Wt 3.1.9.</dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WValidator.html#a1ca29b7eaabf4c1655200ec382a84554" title="Returns a regular expression that filters input.">inputFilter()</a> </dd></dl> <p>Reimplemented in <a class="el" href="classWt_1_1WDateValidator.html#af86a4342d89d6635ab62bb189bdaf9f6">Wt::WDateValidator</a>, <a class="el" href="classWt_1_1WDoubleValidator.html#aed2cd8b4dab3144c567a91a2a6c79011">Wt::WDoubleValidator</a>, <a class="el" href="classWt_1_1WIntValidator.html#a4e2ca08428ae3bdd22dca2d6b48b6cba">Wt::WIntValidator</a>, <a class="el" href="classWt_1_1WRegExpValidator.html#a436a5203db23b5d67eb83d5f3d3232d2">Wt::WRegExpValidator</a>, and <a class="el" href="classWt_1_1WLengthValidator.html#ad146808a017f57c23b0cec6d1126f145">Wt::WLengthValidator</a>.</p> </div> </div> <a class="anchor" id="abafa7c49159d5475a8ec6eff1fef8c17"></a><!-- doxytag: member="Wt::WValidator::setInvalidBlankText" ref="abafa7c49159d5475a8ec6eff1fef8c17" args="(const WString &text)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WValidator::setInvalidBlankText </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>text</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the message to display when a mandatory field is left blank. </p> <p>The default value is "This field cannot be empty". </p> </div> </div> <a class="anchor" id="a6f7993c51a0088b927d7c9aa516efabb"></a><!-- doxytag: member="Wt::WValidator::setMandatory" ref="a6f7993c51a0088b927d7c9aa516efabb" args="(bool how)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WValidator::setMandatory </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"><em>how</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets if input is mandatory. </p> <p>When an input is not mandatory, then an empty field is always valid. </p> </div> </div> <a class="anchor" id="a78808215d68944dedca11ff8889374ed"></a><!-- doxytag: member="Wt::WValidator::validate" ref="a78808215d68944dedca11ff8889374ed" args="(const WString &input) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WValidator_1_1Result.html">WValidator::Result</a> Wt::WValidator::validate </td> <td>(</td> <td class="paramtype">const <a class="el" href="classWt_1_1WString.html">WString</a> & </td> <td class="paramname"><em>input</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Validates the given input. </p> <dl class="note"><dt><b>Note:</b></dt><dd>The signature for this method changed in Wt 3.2.0. </dd></dl> <p>Reimplemented in <a class="el" href="classWt_1_1Auth_1_1AbstractPasswordService_1_1AbstractStrengthValidator.html#a20fc36e693a20f6b3f89ac334c0b7470">Wt::Auth::AbstractPasswordService::AbstractStrengthValidator</a>, <a class="el" href="classWt_1_1WDateValidator.html#ab5dc124f7168757630dfc3b27376ed4d">Wt::WDateValidator</a>, <a class="el" href="classWt_1_1WRegExpValidator.html#a48e12373f8cf76d7e1dfaa2b6f74bea0">Wt::WRegExpValidator</a>, <a class="el" href="classWt_1_1WLengthValidator.html#a7037c50a29792374b729385d134b906e">Wt::WLengthValidator</a>, <a class="el" href="classWt_1_1WDoubleValidator.html#a83572a7226b8c6a09b88d7b7ec17fcef">Wt::WDoubleValidator</a>, and <a class="el" href="classWt_1_1WIntValidator.html#a2598908928e111bc1717a394bfc31fc7">Wt::WIntValidator</a>.</p> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>