You are currently browsing Crystal’s documentation for the 0.4 version - Switch to version: 0.3
One rule per field
// Simple rule
$rules = array
(
'email' => array('valid_email')
);
// Rule with array of options
$rules = array
(
'email' => array('extension: ('jpg gif png')
);
message: string
Crystal has two options for messages - you can use the default messages located in
/path/to/Crystal/messages/validation_errors.php
or you can rewrite them using the message: option
$rules = array
(
'email' => array('valid_email, message: Please provide valid email address')
);