125 lines
1.7 KiB
PHP
125 lines
1.7 KiB
PHP
|
Here is a list of predefined validators. You cannot use these names for your custom validators.
|
||
|
<table width="500">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<b>name</b>
|
||
|
</td>
|
||
|
<td>
|
||
|
<b>arguments</b>
|
||
|
</td>
|
||
|
<td>
|
||
|
<b>task</b>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
email
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is valid email.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
notblank
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is not blank.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
notnull
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is not null.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
country
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is valid country code.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
ip
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is valid internet protocol address.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
htmlcolor
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is valid html color.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
nospace
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value has no space chars.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
range
|
||
|
</td>
|
||
|
<td>
|
||
|
[min, max]
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is in range specified by arguments.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
unique
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value is unique in its database table.
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>
|
||
|
regexp
|
||
|
</td>
|
||
|
<td>
|
||
|
[expression]
|
||
|
</td>
|
||
|
<td>
|
||
|
Checks if value matches a given regexp.
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|