Skip to content

$strict #11

@icebob

Description

@icebob

Strict flag. If set, throw error if found not defined properties.

Example

let schema = {
    $strict: true,
    name: { type: "string" }
}

v.validate({
    name: "John"
}, schema);
// Valid

v.validate({
    name: "John",
    age: 30,
}, schema);
// Error because 'age' property is not allowed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions