For complex validation we might not want to use simple "require()" but an error message that is returned.
If valid is false, the error message. null otherwise
valid
null
Whether the attempt succeeded