Helper to construct a failed ValidationResult
English error message.
Stable error code. Defaults to 'VALIDATION_FAILED'.
'VALIDATION_FAILED'
Optional
All messages. Defaults to [error].
[error]
A failed ValidationResult.
ValidationResult
createFailure('Too short', 'NAME_TOO_SHORT').code; // 'NAME_TOO_SHORT' Copy
createFailure('Too short', 'NAME_TOO_SHORT').code; // 'NAME_TOO_SHORT'
Helper to construct a failed ValidationResult