Skip to content

What is "default" used for? #85

Open

Description

@elad

The first example in the README has a property with a field named default but the code doesn't seem to implement it.

Maybe add after revalidator.js:253 something like:

} else if (schema.default !== undefined) {
    object[property] = schema.default;
    return;
}

And document that it sets the default value on the object's property if it doesn't exist and isn't required?

Activity

  1. added 2 commits that reference this issue on Dec 17, 2014
    3650f45
    7be0d7c
  2. Fortur commented on Aug 31, 2020

    @Fortur

    Please, implement this feature. In my case, need to replase empty and null values to defalt value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions