the schema ast to convert.
optional existing schema.
Uses yup to try and cast value to type or calls back for user defined casting.
the value to be cast.
Converts error message model to standard error model.
the collection of errors as ErrorModel or ErrorMessageModel.
Gets list of validatable types.
the element to be inpsected.
Gets list of native validation keys.
the element to be inspected.
Checks if element has native validation keys.
the element to be inspected.
Checks if object is a Yup Schema.
the value to inspect if is a yup schema.
Normalizes the cast handler so the same signature can be called. When the handler is disabled a noop is created returning the original value.
the cast handler or whether the handler is enabled.
Normalizes the schema into common interface. Always returns object of model or object of key value whe using validateAT.
the yup schema or user function for validation.
If is a Yup Schema parses defaults then stores original source. This allows for re-populating your defaults on next time your route is resolved.
the provided validation schema.
Parses the element for native validators building up an ast for use with Yup. Only a minimal subset of yup validations are supported in converting from native validators or element type values.
Parser supports converting type="element_type" for the following input.
text = string number = number checkbox = boolean
ONLY The following native validators are supported.
email, url, range, required min, max, minLength, maxLength, pattern.
the element to be parsed.
Normalizes default values.
user defined defaults.
the normalized defaults for yup or empty object
If object or array shallow clone otherwise return value.
the value to be cloned.
Parses yup error to friendly form errors.
the emitted yup error.
a method which gets an element.
Generated using TypeDoc
Converts AST type schema to Yup Schema or merges with existing Yup Schema.