Presets
Presets are some more specific types which are build using the real schema types with some already defined options. You can create them using the functions and if you like justify it with some more options.
1. Usage
Here is an example to get a character (based on StringSchema):
import * as val from 'alinex-validator/dist/builder'
// create schema
const schema = val.preset.character()
.upperCase() // specify to be upper case
2. Possible Presets
2.1. word
A combination of non whitespace charcters with a length of at least 1. It is based on StringSchema.
2.2. character
A single, non whitespace charcter. It is based on StringSchema.
2.3. hostOrIP
Either a domain name or an IP address. It is based on LogicSchema using:
2.4. plz
The postalcode for german cities consisting of a number with 5 digits. It is based on NumberSchema.