Rule Name | Argument | Rule Description |
required | Some input is required in the field. | |
maxlength | $length | The input can be at most $length characters. |
minlength | $length | The input must be at least $length characters. |
rangelength | $min,$max | The input must be between $min and $max characters (inclusive). |
regex | $rx | The input must match the regular expression $rx. |
The input must be a likely syntactically valid e-mail address.* | ||
emailorblank | The input must be blank or satisfy the email rule. | |
lettersonly | The input must contain only alphabetic characters. | |
alphanumeric | The input must contain only letters and numbers. | |
numeric | The input must contain a valid positive or negative integer or decimal number. | |
nopunctuation | The input must not contain any of these characters: ( ) . / * ^ ? # ! @ $ % + = , " ' > < ~ [ ] { }. | |
nonzero | The input must not begin with zero. | |
uploadedfile | The element must contain a successfully uploaded file. | |
maxfilesize | $size | The uploaded file must be no more than $size bytes. |
mimetype | $mime | The uploaded file must have a MIME type of $mime. If $mime is an array of MIME types, the uploaded file must have a MIME type equal to one of the elements in $mime. |
filename | $file_rx | The uploaded file must have a filename that matches the regular expression $file_rx. |