array( 'rule' => array('custom', '.*'), 'allowEmpty' => true, 'required' => false, 'message' => 'Post title is required' ), 'body' => array( 'first_rule' => array( 'rule' => array('custom', '.*'), 'allowEmpty' => true, 'required' => false, 'message' => 'Post body is required' ), 'second_rule' => array( 'rule' => array('custom', '.*'), 'allowEmpty' => true, 'required' => false, 'message' => 'Post body is super required' ) ), ); /** * Translation domain to use for validation messages * * @var string */ public $validationDomain = 'test_plugin'; }