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 -

c++ - How to test/verify that zero-initialization takes place -

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -