Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Configure custom localized error message for Mandatory Fields
By Krishna Rajappa
Hey Team,
As of now for Mandatory fields with null value throws exception
in logs with following message "No value was provided for
required object field "Test" ". Is there any plan
to implement that allow users to configure custom error message for
Mandate fields in object ?
Thanks for your question, Krishna.
We don't have plans so far for this implementation. Can you share the real example that led you to send this question? What was the use case and the message that you would like to have there in the object validation? Also, are you using in the Object layout directly, in a remote application, or forms with objects as storage type?
Thank you for replying.
My use case is to use objects in place of Service builder with custom portlet to write front end elements so we would be using Object Entry services or headless end points to add an entry into the object.
Since we would be using our custom portlet for form submission and Object for backed validation when mandatory fields throws exceptions by object validator we would need to capture and show it to user that this field is required error message based on locale
Another use case is:
We have exposed object headless end points to Mobile app and when they send null value to mandatory fields, request is rejected with no proper error message . It would be nice if we throw proper error messages for Mandatory fields via headless calls
Thanks for the context Krishna,
The custom error message that you want to add is to solve the localization problem or you want to even edit the out of the box ones in each language?
Could you please open a feature request with this case? It is important that have on Jira and link to this thread.
Thank you
Powered by Liferay™