Preventing wildcards in dashboard text form fields is relatively easy. Example preventing * asterisks from being entered. The result is a bold red error message and the search is not executed.
<input type="text" token="user_name">
<label>Username</label>
<change><!--event trigger on submit to check for * in the user_name field-->
<condition match="not like($value$,"*")">
<!--if input contains *, eval sets a token which stops the search and displays the html reject-->
<set token="logLevelTok">$value$</set>
</condition>
<condition><!--no * is in user_name field-->
<unset token="logLevelTok"></unset>
</condition>
</change>
</input>
<html rejects="$logLevelTok$">
<div>
<p style="color:red;font-weight:bold;font-size:150%;text-align:left;">
Asterisks "*" are not permitted.
</p>
</div>
</html>
,If you need an input text form field, you can prevent wildcards by tokens and conditions. Example:
<input type="text" token="user_name">
<label>Username</label>
<change><!--event triggered by submit, checks user_name field for astericks-->
<condition match="not like($value$,"*")">
<!--if input contains *, eval sets a token which stops the search and displays the html reject-->
<set token="logLevelTok">$value$</set>
</condition>
<condition><!--no * is in user_name field-->
<unset token="logLevelTok"></unset>
</condition>
</change>
</input>
<html rejects="$logLevelTok$">
<div>
<p style="color:red;font-weight:bold;font-size:150%;text-align:left;">
Asterisks "*" are not permitted.
</p>
</div>
</html>
The output is bold letters warning the user about wild cards just below the form field.
... View more