Skip to content
New issue

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

type validation with object throws error message #121

Open
delhibabu86 opened this issue Feb 15, 2018 · 0 comments
Open

type validation with object throws error message #121

delhibabu86 opened this issue Feb 15, 2018 · 0 comments

Comments

@delhibabu86
Copy link

Hi
I am getting issue with validation. Below is the error message recieved ,data & validation schema used for it.

My question is the error response clearly says actual & expected are of type object. Why are we still seeing validation error. Please clarify.

Error Response : { valid : false,errors :[ {attribute: "type", property: "field1", expected: "object", actual: "object", message: "field1 is required"},{attribute: "type", property: "field2", expected: "object", actual: "object", message: "field2 is required"}] }

Data - { field1 : "A", field2 : null }
ValidationSchema - properties: {
field1: {
type: 'object',
required: true,
allowEmpty: false,
message: 'Field 1is required',
},
field2: {
type: 'object',
required: true,
allowEmpty: false,
message: 'Field2 is required',
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant