Created
July 24, 2013 21:23
-
-
Save copleykj/6074687 to your computer and use it in GitHub Desktop.
A Mesosphere rule to make sure a check box array has at least one field checked.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mesosphere.registerRule("exactChecked", function(fieldValue, ruleValue, fieldName, formFieldsObject, fieldRequirements){ | |
if(_(formFieldsObject[fieldName]).isArray() && formFieldsObject[fieldName].length == ruleValue){ | |
return true; | |
} | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment