Creates a simple validator using an error message
The error message to show if the validation fails
The condition of when the error should be thrown (i.e. true -> error)
A validator
Creates a simple validator using an error message