Created
November 13, 2018 12:32
-
-
Save simpluslabs/d2e8ce378e809de798e4afec2964f00d 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
({ | |
validateContactForm: function(component) { | |
var validContact = true; | |
// Show error messages if required fields are blank | |
var allValid = component.find('contactField').reduce(function (validFields, inputCmp) { | |
inputCmp.showHelpMessageIfInvalid(); | |
return validFields && inputCmp.get('v.validity').valid; | |
}, true); | |
return allValid; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment