开发者

Partial validation using cakephp

开发者 https://www.devze.com 2023-03-04 13:13 出处:网络
I\'m new to cakePHP I want to know if there\'s a way to validate a form partially as in JavaScript. Situation:

I'm new to cakePHP I want to know if there's a way to validate a form partially as in JavaScript.

Situation:

I have a select box with 2 opt开发者_Python百科ions - 1. free, 2. paid

When paid is chosen a text input field appears for a price.

Any ideas?

Thanks in advance.


You can do custom validation rules. So, your form would validate differently, depending on if it's a paid user or a free one.

This link will give you some ideas of how to get started with it:

http://bakery.cakephp.org/articles/aranworld/2008/01/14/using-equalto-validation-to-compare-two-form-fields

0

精彩评论

暂无评论...
验证码 换一张
取 消