Zod class

this is the main class of the package it is responsible for validating the data and returning the error message

Constructors

Zod({ILocaleZod? localeZod})

Properties

hashCode int
The hash code for this object.
no setterinherited
localeZod → ILocaleZod?
parameter responsible for receiving the locale
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(dynamic value) String?
cnpj([String? message]) Zod
this method is responsible for cnpj validation
cpf([String? message]) Zod
this method is responsible for cpf validation
cpfCnpj([String? message]) Zod
custom(bool validate(dynamic), {String? errorMessage}) Zod
email([String? message]) Zod
this method is responsible for email validation
equals(dynamic value, [String? message]) Zod
verify equals validate
isDate(String? message, {DateTime? max, DateTime? min}) Zod
isEmails([String? message]) Zod
verify emails validate separated by comma example: email1@gmail,com,email2@gmail,com
max(int max, [String? message]) Zod
this method is responsible for max validation
min(int min, [String? message]) Zod
this method is responsible for min validation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optional({bool isValidWhenEmpty = true}) Zod
password({String? message, bool number = true, bool special = true, bool upper = true, bool lower = true, int minLength = 8}) Zod
this method is responsible for password validation
phone([String? message]) Zod
this method is responsible for phone validation
required([String? message]) Zod
this method is responsible for validation if the param existe
toString() String
A string representation of this object.
inherited
type<T>([String? message]) Zod
this method is responsible for type validation

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

zodLocaleInstance ↔ ILocaleZod
this is the default locale
getter/setter pair

Static Methods

validate({required Map<String, dynamic> data, required Map<String, dynamic> params, bool returnString = false}) → ValidateModel
The return id a Map<String, dynamic> with the errors or The return id a List