You need to sign in to do that
Don't have an account?

How to validate lookup lightning input field in record Edit form
I have a record edit form with multiple custom lookup fields. Standard validation rules on lookup fields with an invalid input would give an error message "An invalid option has been choosen". Looks like lightning:inputfield for lookup doesnot fire these validations. Any workaround would be greatly appreciated.
On submit, it would not error out and would not save this invalid value.
Greetings to you!
I tried to research your problem and found that this is a known issue: https://success.salesforce.com/issues_view?id=a1p3A000000JX0XQAW
Also, please take a look at these known issues as well: https://success.salesforce.com/issues_view?id=a1p3A000000JWo7QAG&title=lightning-inputfield-does-not-respect-disabled-attribute-when-field-type-is-lookup
https://success.salesforce.com/issues_view?id=a1p3A000000FmjRQAS&title=lightning-recordform-not-capturing-validation-errors-in-component-s-controller
Unfortunately, there is no workaround available at this time. However, it is in a review and we may get a solution for this soon. Keep watching this issue until get fixed.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas