Quantcast
Viewing all articles
Browse latest Browse all 82127

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 <b>must</b> 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.

Viewing all articles
Browse latest Browse all 82127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>