i have a web form application ,in which have different form to get user data.i have used regex in the input form simply as validation expression.But i want to check user input and quick response him about his input data that what is to add and check the input for not empty using ajax ,my fields label are ,name (just alphabet and space),rollno(digits+/ ) ,phone no etc
Vaildate form input Using Ajax and regex
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Arunava BhattacharjeeRank #635 · 3.8K reputationPosted Sep 26, 2014, 3:35 AM EDT
$(function(){
$("input[id$='txtTest']").bind('keypress', function(){
if($(Your Regex Comparison with TextBox value)
$("[id$='message']").text('correct your input. it should be in form of : ');
else
$("[id$='message']").text('');
});
});
Mark it as accepted if it works for you!