0

are the required fields validators, compare validators etc server side validations or client side validations?

Thanks

1

3 Answers 3

1

The validators generally do both client and server-side, but it all depends on how you configure them. Look for an EnableClientScript property. If you build a custom validator, you can supply server code, client code, or both, but you have to write the code for both sides independently.

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

Comments

0

They'll run on the client (unless EnableClientScript is false) and prevent submission of the form if it's invalid. They will also run on the server, if the client-side checks are bypassed. Be sure to check Page.IsValid before taking action in event handlers (the event handler still runs, even if server-side validation fails).

Comments

0

A good explanation I've heard is

  1. Client side validation is for the user's benefit (for the reasons @Garry explained in his answer above).
  2. Server side validation is for the benefit of system integrity (also for the reasons @Garry explained in his answer above).

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.