You are viewing limited content. For full access, please sign in.

Question

Question

Set "Regular Expression for validation" from javascript

asked on September 9, 2020

Hi,

Does anyone know how to set "Regular Expression For Validation" from javascript?

 

 

Thanks,

0 0

Answer

SELECTED ANSWER
replied on September 10, 2020 Show version history

Hi Luis,

I tried front-end validation will work with following code

$(document).ready( function () {
  $('#q1 input').prop('pattern', '\\d\\d');
})

While, compare to 'Regular expression for validation' option, back-end validation will not respect the property set by JavaScript if front-end validation is somehow passed.

1 0
replied on September 10, 2020

Works! Thanks Ziyan

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.