From 8a9369757d261b176d87cd82ecadfb7e26c3cd9b Mon Sep 17 00:00:00 2001 From: Natanael dos Santos Feitosa <52074821+natanfeitosa@users.noreply.github.com> Date: Mon, 6 Mar 2023 15:25:25 -0300 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 64ec4ab..ab1efa5 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,12 @@ print(n.validate(2023)) # False > Add a mutation function than will run after the `validate` method. P.S. Will only be executed in the `parse` method * `parse(data): typeof data` > Run the `validate` method, the mutations and return a deep clone of data +* `default(data): Self` + > Set a default value for when the validator receives None and you don't want to generate an error +* `optional(): Self` + > Allow values None +* `required(error_message=None): Self` + > Mark the schema as required. Does not allow values None ### `NumberSchema` inherits from [`BaseSchema`](#baseschema)