lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Email validation on Login Form #605

Closed tylerforesthauser closed 9 years ago

tylerforesthauser commented 10 years ago

Hi there,

I wanted to make a small suggestion for the LoginForm.php rules.

    /**
     * Declares the validation rules.
     * The rules state that username and password are required,
     * and password needs to be authenticated.
     */
    public function rules()
    {
        return array(
            // Why not use CEmailValidator for the email field?
            array('email', 'email'),
            // username and password are required
            array('email, password', 'required'),
            // rememberMe needs to be a boolean
            array('rememberMe', 'boolean'),
            // password needs to be authenticated
            array('password', 'authenticate'),
        );
    }

Thanks!

gabeguz commented 9 years ago

Hi @tylerforesthauser Was your suggestion just to add:

array('email', 'email')

to the rules for loginForm? If so, then this has been done. The loginForm rules have changed a bit, so I can't tell immediately which change you were proposing.

Let me know if this is ok to close, or if there was something else that I missed.

tylerforesthauser commented 9 years ago

@gabeguz That is perfect! This can definitely be closed. Thank you kindly.