I've created a form using jqBootstrapValidation.js to validate it.
However I can't seem to get the regex for my FQDN format field to work.
<input class="form-control"
type="text"
name="cn"
id="commonname"
data-validation-regex-regex="/^(?=.{1,254}$)((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/i"
data-validation-regex-message="Must enter a vaild FQDN" required>
It invalidates any FQDN I enter.
I know that there are a few different formats to regular expressions.
Am I using the wrong formatting for javascript?