Menu icon Foundation
adding custom validator error in 6.4.3

i made simple test.

installed foundation with foundation cli and copy paste from foundation abide doc:

https://foundation.zurb.com/sites/docs/abide.html#adding-custom-pattern-and-validator

 

when i insert any number to the following input:

<input id="max" type="number" data-validator="greater_than" data-greater-than="min" required>

i get:

foundation.js:5138 Uncaught TypeError: _this5.options.validators[v] is not a function

    at foundation.js:5138

 

what i'm doing wrong?

in foundation 6.3.1 it's works great.

i really like the new foundation 6.4.3 but i cannot upgrade without this feature working.

any help would be very appreciated

 

Foundation 6.4.3abidevalidator

i made simple test.

installed foundation with foundation cli and copy paste from foundation abide doc:

https://foundation.zurb.com/sites/docs/abide.html#adding-custom-pattern-and-validator

 

when i insert any number to the following input:

<input id="max" type="number" data-validator="greater_than" data-greater-than="min" required>

i get:

foundation.js:5138 Uncaught TypeError: _this5.options.validators[v] is not a function

    at foundation.js:5138

 

what i'm doing wrong?

in foundation 6.3.1 it's works great.

i really like the new foundation 6.4.3 but i cannot upgrade without this feature working.

any help would be very appreciated

 

Benjamin Kohl about 2 years ago

I am getting the exact same error when attempting to register custom validators in the manner described in the documentation. I mentioned it on an existing issue where a change was merged that may or may not be related to this issue: https://github.com/zurb/foundation-sites/pull/10377 

I also documented the issue here: https://foundation.zurb.com/forum/posts/54463-registering-custom-abide-validators-in-foundation-v643 (For some reason, turning this into a link strips pieces of the URL out and it is a broken link.)