How to customize 'required' attribute in data-abide

I’d like to customize the data-abide form validation feature in Foundation so fields with the ‘required’ attribute not only require a value, but also do not allow a certain string.

For example, in my forms, I never want to allow the value of ‘[Auto-completed].’

I’d rather not have to flag each of these fields with a special data-abide pattern. (And, for that matter, Foundation.Abide.defaults.patterns[‘foobar’] would define a pattern the field must match, not a pattern the field cannot match!)

You can use a custom pattern which are normal regular expressions or use a custom validator:

https://get.foundation/sites/docs/abide.html#builtin-patterns-and-validators
https://get.foundation/sites/docs/abide.html#adding-custom-pattern-and-validator

Thanks. But I’d like to customize Foundation’s existing required validator.

I doubt that you can overwrite it as it is in the component.

Unless you change the sourcecode.

Closing as this was cross-posted at https://stackoverflow.com/questions/62685420/how-do-i-customize-the-required-pattern-in-foundations-data-abide