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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -