comma separator in textBox field

Jan 25 2019 12:51 PM

I have a textbox with jQuery validations on it
This textBox is not allowing comma in between the values, can someone please help me out
Below is the code

var txtValue = $("#txtValue").val();

txtValue = txtValue.replace(/(^\s*)|(\s*$)/gi, "").replace(/[ ]{2,}/gi, " ").replace(/\n +/, "\n");

var Regex = /^[0-9a-zA-Z-]+$/;

if (!Regex.test(txtValue)) {...


Brought to you by:

Answers (3)