jwaliszko / ExpressiveAnnotations

Annotation-based conditional validation library.
MIT License
351 stars 124 forks source link

Setting the default error message #217

Open darrenw-npi opened 1 year ago

darrenw-npi commented 1 year ago

Firstly thank you for a great library! It's already been super helpful.

I just have a quick question / feature request please... At the moment if the user neglects to enter a value they are presented with a message along the lines of The {{fieldName}} field is required by the following logic: {{logic}}

Is there a way to change this message please? Perhaps in a config file or something? I would like to make the message conform to our existing error handling within the app and remove the reference to the logic which would be confusing for our average user. I realise I can override the error message on the [RequiredIf] property but I would rather do it once for all of the properties if possible to reduce the administrative overhead and complexity in managing these.