Where do you record validation rules for form data in a web application?

前端 未结 10 1048
广开言路
广开言路 2020-12-24 09:34

Say you have a web form with some fields that you want to validate to be only some subset of alphanumeric, a minimum or maximum length etc.

You can validate in the c

10条回答
  •  囚心锁ツ
    2020-12-24 09:59

    We try to keep get our validation done before it ever hits the database server, especially for our applications which are facing the public internet. If you don't do validation before the data hits the database, you put your database at risk for SQL-injection attacks. We validation through a mixture of javascript and code-behinds.

提交回复
热议问题