Closed benmonro closed 8 years ago
JSBin here: (thanks for that JSBin fix :smile: )
Thanks @benmonro, working on this...
@benmonro I found a fix. Pushed to master and 0.6.x branches. Could you please give it a try before releasing?
@gcanti you are a legend! works great, thanks!
I have a case where my custom error message is not being triggered for a refinement which is wrapped by
maybe
. Consider the following schema & code:When I enter an invalid value for age (say 2 for example). The required version of age WILL get the error message passed to the template, but the optional one will not. I verified that the error is present when I call form.validate() but for some reason it's not being passed into the template. You can see the results here:
You'll notice that the optional field is _NOT_ displaying the error message (because locals.error is undefined for that field), but it _IS_ displayed for the required version of the same refinement.