Validating Numeric Fields
// validate a number entered into a custom numeric field
function projectRating() {
var rating = NSOA.form.getValue('ProjectRating__c');
if ( rating < 1 || rating > 5 ) {
NSOA.form.error('ProjectRating__c', 'Ratings must be whole numbers between 1 and 5.');
}
}
See also: