We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normally we have errors like
[]string{ "Required field 'Name' is not provided", "Age must be greater than 18" }
However this does not support custom error messages.
Providing "resourceType" and "failed" allows us to create custom error messages, both on the frontend and backend.
[]enforcer.Failed { enforcer.Failed{ ResourceType: "name", Failed: "required", }, enforcer.Failed{ ResourceType: "age", Failed: "min:18", }, }
Then you can create custom error messages for any language like
// utils/generateErrorMessage.js function generateErrorMessage(resource, failed) { return "Appropriate error from failed" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Normally we have errors like
However this does not support custom error messages.
Providing "resourceType" and "failed" allows us to create custom error messages, both on the frontend and backend.
Then you can create custom error messages for any language like
The text was updated successfully, but these errors were encountered: