0

I am creating a site for legacy mobile browsers (e.g.: browsers running on Nokia 2760), and cannot, of course, use JS nor HTML5. Is there any way to restrict user's input to prevent them to send letters in a numeric field? Or the best I can do is to execute a server-side validation?

Thanks!

Edit: I would like to have both client and server-side validation, not only the server-side one. It is desirable for me to restrict user's input, just like an <input type="numeric" /> does. Tyiping several numbers in a old cellphone without that feature is painful.

The doctype I am using is

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML Basic 1.0//EN” “http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd”>
2
  • You should always have server-side validation anyway... If anyone disables JavaScript on their browser, your validation goes out the window. Commented Sep 19, 2016 at 12:14
  • I edited the question so it's more clear, thanks Commented Sep 19, 2016 at 12:24

1 Answer 1

1

Server side if your only option here.

JavaScript and the new features introduced in HTML 5 are the only client side options, and you've ruled them out.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.