«« Next » « Previous
«« Next » « Previous

Link Details

Link 97497 thumbnail
User 111696 avatar

By bloid
via snook.ca
Submitted: Jul 23 2008 / 12:35

In CakePHP, you define how your data should be validated by setting parameters on the validate property of your model. In version 1.2, there is an on option that can be set on a specific rule that, when set, is either create or update. This allows you to define different rules depending on the type of action being performed. That, in combination with the required and allowEmpty properties, give you a fair amount of control over different validation rules.
  • 3
  • 0
  • 71
  • 11

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)



Voters Against This Link (0)