Foundation Abide matching line breaks

65 Views Asked by At

I am trying to use foundation abide to make error when my form is submitted. I cannot grasp how to allow any character to pass (limited 2000) and allow line breaks:

My code

trainerDescription : /^.{0,1999}$/,
1

There are 1 best solutions below

0
Avinash Raj On BEST ANSWER

Since javascript won't support (?s) dotall modifier, you could use [\s\S] regex to match any space or non-space character. Note that \s would match any kind of whitespaces (vertical or horizontal).

/^[\s\S]{0,1999}$/m