php - Check Input contain Text and Number using JavaScript -
i have input text field in webpage. need validate field field contain both text , numbers. ie input box if cost need validate if cost in format of '100 r'
i have validated number, how can validate text , number
var number = document.forms["myform"]["cost"].value; if (isnan(number)) { alert("cost must in number"); document.myform.cost.focus() return false; }
Comments
Post a Comment