-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
I am using it in a engine core, on Rails 5.2.0
validates :children, json: { schema: CHILDREN_SCHEMA }
I am not getting proper error message
"children": [
"translation missing: en.activerecord.errors.models.core/user.attributes.children.invalid_json"
]
After adding :message option
validates :children, json: { message: ->(errors) { errors }, schema: CHILDREN_SCHEMA }
The error message is:
"children": [
"The property '#/0' did not contain a required property of 'gender' in schema file:///Users/navneet/rails_app/components/core/app/models/schemas/children.json"
]
Is there any way to change the message format similar to:
"children": [
"0": {
"gender property missing"
}
]
Any suggestions will be helpful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels