validator on a second field
validator on a second field
Field::inst( 'casetype' )->validator( 'Validate::required' ),
Field::inst( 'factsnum' )->validator( function($val, $data, $opts) {
if ('casetype' == 'this' && strlen($val) < 3) {
return "Value must is required!";
}
return true;
} ),
How do I enter the input field of another value. In this case casetype!
In plain english if casetype is this the length of the string must be greater than 3.
Field::inst( 'factsnum' )->validator( function($val, $data, $opts) {
if ('casetype' == 'this' && strlen($val) < 3) {
return "Value must is required!";
}
return true;
} ),
How do I enter the input field of another value. In this case casetype!
In plain english if casetype is this the length of the string must be greater than 3.
This discussion has been closed.
Replies
Allan