function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pratik Raut 14Pratik Raut 14 

lightning:inputField in lightning:recordEditForm not showing validation errors for lookup field in Lightning Component

Hello,
I am using lightning:inputField inside lightning:recordEditForm in the lightning component. What happened here I  have a validation rule for lookup field(Field A(PickList type) and field B(Lookup Field) validation rule is if field A has some value then field B should not be empty/null and error location is set to below field i.e field B). Whenever validation rule fire for above scenario it not showing validation error below the field. This happens only in case of Lookup field if I do not use lookup field then the validation error is showing properly below the field.
Thank You 
Pratik 
Best Answer chosen by Pratik Raut 14
Khan AnasKhan Anas (Salesforce Developers) 
Hi Pratik,

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.

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

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Pratik,

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.

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
This was selected as the best answer
Pratik Raut 14Pratik Raut 14

Hi Anas,

Thank you for your reply. The links you provided is really helpful for me.