2

I'm using Zurb Foundation and I'm trying to make custom password validation using abide validation.

I need to make sure the password has at least 1 uppercase, 1 lowercase, 1 number, 1 special character and this is the regex I'm using /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\da-zA-Z]).{8,15}$/ which I got from this accepted answer here.

But I can't submit the form, although I'm fulfilling the conditions for the password.

This is a jsfiddle link, although I couldn't add foundation.js properly as External Resource, I get the same behavior I'm getting on my local machine.

So what is it that I'm missing.

Community
  • 1
  • 1
Ahmed
  • 511
  • 3
  • 6
  • 26

1 Answers1

0

If you take a look on your developer console, you will see an error:

Uncaught Error: Syntax error, unrecognized expression: [data-'Times New Roman'-dropdown]

Nothing special. It's a known issue, that has been described many times. Before calling Foundation, add:

Foundation.global.namespace = '';
$(document).foundation();

Now fix an error with Modernizr, by adding it as a dependency - just include it before Foundation. Link.

At the end your fiddle will look like this: https://jsfiddle.net/fg16v5uc/

Kamil Szymański
  • 950
  • 12
  • 26