Skip to content

type validation with object throws error message #121

Description

@delhibabu86

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',
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions