You need to sign in to do that
Don't have an account?
Sam Swann
Accessing specific attribute from V.Value
Hi
I am new to Lightning Component development.
I have a method in my controller.js for validation check.
How can I make 7 attributes to have this validation check and not for one field?
I need to extract that field from cmpValue, but I am not sure which default method to call.
Thanks
I am new to Lightning Component development.
I have a method in my controller.js for validation check.
validateEmptyField : function(component) { var cmpValue = component.get("v.value"); if ($A.util.isEmpty(cmpValue) || $A.util.isUndefined(cmpValue)){ component.set("v.errors", [{message:"Field cannot be empty. Please enter valid data."}]); return false; } return true; }I do have like 8 attributes for the v.value.
How can I make 7 attributes to have this validation check and not for one field?
I need to extract that field from cmpValue, but I am not sure which default method to call.
Thanks