Last active
August 29, 2015 14:06
-
-
Save robbl/996e96cb6d358d90021f to your computer and use it in GitHub Desktop.
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
validate_object_attribute_fields = () -> | |
object_attribs = $('div.active .object_select') | |
error = false | |
for select in object_attribs | |
id = select.id | |
if select.value == "" | |
$('div.active .evalsheet_object label[for="'+id+'"]').addClass('error-required-fields') | |
error = true | |
else | |
$('div.active .evalsheet_object label[for="'+id+'"]').removeClass('error-required-fields') | |
error = false | |
!error # return false if validation fails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment