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

lighting:RecordForm error message
I am getting only the below generice error message in lightning:RecordForm compoennt
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]"}]}}
Also the required fields astrerik is not appearing next to the requied fields
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]"}]}}
Also the required fields astrerik is not appearing next to the requied fields
Looks like your required field is missing .. aff the LastName field to the lighting:RecordForm and try ..

I have the requried field in the form. I removed the value from the last name field to check whether the required field validation message was displayed properly.
Use <lightning:messages /> like below