# lightning:recordForm not displaying full error message

I am getting only the below generic error message in lightning:recordForm component.

An error occurred while trying to update the record. Please try again.

But I see the below error in the onerror event parameter.

"message":"An error occurred while trying to update the record. Please try again.","detail":"","output":{"errors":[],"fieldErrors":{"Name":[{"constituentField":"LastName","duplicateRecordError":null,"errorCode":"REQUIRED_FIELD_MISSING","field":"Name","fieldLabel":"Last Name","message":"Required fields are missing: [LastName]"}]}}

     <lightning:recordForm objectApiName="{!v.objectName}" aura:id="recordForm"
fields="{!v.fields}"
mode="readonly" columns = "{!v.columns}" recordId="{!v.recordId}" onsubmit="{!c.handleSubmit}" onsuccess="{!c.handleSuccess}"  oncancel="{!c.handleCancel}" onerror="{!c.handleError}">
<lightning:messages />
</lightning:recordForm>

• can you add markup? also have you added  <lightning:messages /> in your markup? – Pranay Jaiswal Mar 19 at 14:19
• <lightning:recordForm objectApiName="{!v.objectName}" aura:id="recordForm" fields="{!v.fields}" mode="readonly" columns = "{!v.columns}" recordId="{!v.recordId}" onsubmit="{!c.handleSubmit}" onsuccess="{!c.handleSuccess}" oncancel="{!c.handleCancel}" onerror="{!c.handleError}"> <lightning:messages /> </lightning:recordForm> – vinny Mar 19 at 15:12
• Can you edit the question and then add markup? – Pranay Jaiswal Mar 19 at 15:13
• The markup in your question doesn't seem to be the correct one. The mode in there is readonly where you cannot edit a record. – Jayant Das Mar 19 at 15:41
• Jeyanth I have an edit button in the top right corner to change the mode from readonly to edit. Please see my screenshot in the original question.We did this to have only one edit icon instead of having multiple edit icons (in view mode) on each field. – vinny Mar 19 at 15:45

That seems to be the expected behavior for client-side validations using lightning:recordForm. Referring to the Client-Side Validation section in documentation, it mentions the scenario you are experiencing (emphasis mine):
The lightning:recordForm component performs client-side validation on record fields only if you interact with them. For example, if you edit a record that includes a required field and submit the form without interacting with that required field, you see only that an error occurred. The form does not flag the required field as incorrect.