Based on this PR by @apalm in Revalidation.
It makes a lot of sense to enable to pass in a function instead of a string, in case the input value is needed to display a useful error message.
The specific change would require to check if errorMsg is a function and if so apply the function with the value.
Based on this PR by @apalm in Revalidation. It makes a lot of sense to enable to pass in a function instead of a string, in case the input value is needed to display a useful error message.
The specific change would require to check if
errorMsg
is a function and if so apply the function with thevalue
.https://github.com/25th-floor/spected/blob/master/src/index.js#L36