All validation tests yield one of two results:
invalid. Both are objects.
message argument in the validation tests must be a static string, a template string, or a function returning a string.
A validation type is expected to parse and prepare the value for the provided validation tests. For example, the
string validation type ensures the provided value is a string,
undefined. It must be a function that takes a value of any type and returns a promise which resolves to a validation result (see above).
A validation test is a simplified version of a validation type. It accepts a value of a specific type including
undefined and then returns a promise that resolves to a validation result. You can use a validation test directly without the validation type, but it's not recommended as you lose the parsing step and you can't apply multiple tests to the same field as easily.