2

Is there any way to perform client side form validation when JavasSript is disabled in browser?

6
  • no there is not. only server side. Commented Nov 23, 2011 at 13:11
  • 1
    Without use of plug-ins or the new HTML5 input types (eg <input type="email" />), no. Commented Nov 23, 2011 at 13:12
  • 1
    check this link may help you stackoverflow.com/questions/2056448/… Commented Nov 23, 2011 at 13:12
  • 1
    You should never ever rely on client side validation. Commented Nov 23, 2011 at 13:13
  • 1
    May be using server side validation when javascript is disabled will fit your requirements. Commented Nov 23, 2011 at 13:14

2 Answers 2

6

HTML 5 introduces some validation features (limited browser support), but other than that — no.

However, you shouldn't worry too much about it since:

  • most users will have JS supporting browsers with JS enabled
  • you need to have have server side validation in place (since client side validation can save users from making mistakes, but it can't prevent malicious attacks) and if JS isn't available, then it will simply fall back to the server and you get the same result with just an extra HTTP request added.
Sign up to request clarification or add additional context in comments.

Comments

1

There's HTML5 form validation, and AFAIK Opera supports it even if client-scripting is disabled. See:

http://www.the-art-of-web.com/html/html5-form-validation/

Do any browsers yet support HTML5's checkValidity() method?

Comments

Your Answer

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