Skip to content

Instantly share code, notes, and snippets.

@icambridge
Created February 25, 2012 14:08
Show Gist options
  • Save icambridge/1908688 to your computer and use it in GitHub Desktop.
Save icambridge/1908688 to your computer and use it in GitHub Desktop.
CakePHP model validation assignment
<?php
class Test extends AppModel {
public $validate = array(
'field' => array(
array(
'rule' => array('customRule','Extra argument.'),
'message' => 'The field must validate.'
)
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment