我的问题是关于客户端和服务器端验证的 [英] my question is about client side and server side validation

查看:51
本文介绍了我的问题是关于客户端和服务器端验证的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

必需的字段验证器是服务器端验证器吗?

required field validator is server side validator?

推荐答案

您可以让必需的字段验证器在客户端和服务器端都被编码/实现.在发送给服务器之前,客户端很可能会在JavaScript中检查输入内容.

但是,服务器端脚本将必须读取输入,然后,如果无效数据将客户端重定向到输入屏幕(例如,窗体).

我更喜欢客户端,因为对我而言,它的编码较少.
You can have a required field validator be coded/implemented both client and server side. The client side would more than likely be done in JavaScript checking the input BEFORE sending on to the server.

The server-side script however would have to read the input then if invalid data redirect the client to the input screen (form, for example).

I prefer client-side because to me its less coding.


这篇关于我的问题是关于客户端和服务器端验证的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆