Using core validation within custom validation on CakePHP Forms/Models?

前端 未结 1 1126
走了就别回头了
走了就别回头了 2021-01-18 21:38

Using CakePHP 1.3

I understand the example at http://book.cakephp.org/complete/1143/Data-Validation#Adding-your-own-Validation-Methods-1181 on how to add my own

相关标签:
1条回答
  • 2021-01-18 21:48

    Validation::numeric($this->data['field'])

    Validation class (validation.php) is located in cake/cake/libs and you can see the available methods by inspecting the file (they're the same as the ones you pass to the validation array).

    Validation methods return true if validation passes.

    0 讨论(0)
提交回复
热议问题