Ok, another basic question that I though would work but alas.....
- the Required highlights and message only appear IF you enter a value then remove the value (interact with the field)
- You can check for validity and it will return null if the user has not interacted with it
- I see no way to cause the message to be displayed from the component controller when checking validity
The Problem: - If the field is required AND the user has not entered a value (a pretty common use case I would think) How do you make the field display the validation error like this
If the user does not interact with the field it seems there is no way to call it out?? Am I missing something.
The only way the field looks like above is if the user has entered and removed a value or if they removed the preexisting value....
in Component controller:
var e = component.find('bAddress'); console.log(e.get('v.validity'));
If the user has not interacted with the element then the value of validity will be null.
isValid() always seems to equals to true regardless of if it is null or not