You need to sign in to do that
Don't have an account?
Kalpesh Vyas 14
I wish to understand this validation example in lightning
I wish to understand this validation example in lightning
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
// 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);
https://salesforce.stackexchange.com/questions/184525/help-me-to-undestand-this-lightning-helper-methods-reduce-showhelpmessageifin/184535
All Answers
https://salesforce.stackexchange.com/questions/184525/help-me-to-undestand-this-lightning-helper-methods-reduce-showhelpmessageifin/184535