alex-w
(Pr0j3ct A1ex)
1
I have some fields which should only be validated if they are visible (password change fields).
Would be good to specify they should only run client validation if they are currently visible.
Something like,
public function clientValidateAttribute($object,$attribute) {
...
if($('#' + this.id).is(':visible') && $.trim(value)=='') {
...
}
mhorrocks
(Michael Horrocks)
2
Google "jonahs yii validation scenarios" that should point you in the right direction.
I tried adding a link but because I’m new on here it wouldn’t let me.
samdark
(Alexander Makarov)
3
I guess model scenarios are covering this very well.