uon-nuget / UoN.ExpressiveAnnotations.NetCore

Annotation-based conditional validation library.
Other
29 stars 12 forks source link

RequiredIf AllowEmptyStrings attribute doesnt propagate to the expressive.annotations.validate.js #32

Open hatfies3 opened 1 year ago

hatfies3 commented 1 year ago

default or explicitly set AllowEmptyStrings parameter on the RequiredIf attribute doesnt make it through to the expressive.annotations.validate.js. In the legacy .net version it would end up with a data-val-requiredif-allowempty="false" html attribute but in this version it ends up with a data-val-allowempty="false".

I believe the expressive.annotations.validate.js expects the associated requiredif prefix for this to be picked up and so the RequiredIf is not able to fail a field with an empty string.