errorForAll
errorForAll(message, [ctx])
Effect
error
set the custom error message for the restrict before error calling position. errorForAll
set custom error message for all restrict.
Since
>=1.3.0
Arguments
message
(string | function)
- The custom error message. If it's a function, the function should return a string, respect the custom error message. The function has an argument: the original validate error object.[ctx]
(*) - The execution context ofmessage
when it's a function.
Example
Last updated