且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在不同的Web浏览器中的不同的验证消息

更新时间:2023-02-22 09:17:20

There are two checks in place. The first one (that one that you see) ist the check on client side. The input field has a required parameter. So the browser knows that the field can't be blank and says than in it's language. Nothing is sent to the server till now. After filling in and sending the form, then the second check is in place which is the cakephp validation.

Try it with this:

    'title' => array(
        'kosher' => array(
            'rule' => 'email',
            'message' => 'Please make sure your email is entered correctly.'
        ),
        'required' => array(
            'rule' => 'notEmpty',
            'message' => 'Please enter your email.'
        )

Then you will see: 1) if you enter nothing, then the browser message appears (client side), 2) if you enter some text, which is no email, then the message from above appears ('Please enter your email.')

上一篇 : :Delphi Chromium Embedded-清除浏览器缓存下一篇 : HTML / CSS字体:不同的浏览器/操作系统有不同的结果

相关阅读

技术问答最新文章