private function AddPasswordField()
    {
        $name = 'Password';
        
        $this->AddField(Input::Password($name));
        //Password needs contain lower case letter, upper case letter, and a digit
        //$validator = new RegExp('/((?=.*\d)(?=.*[a-z])(?=.*[A-Z]))/');
        //$this->AddValidator($name, $validator);
        $this->AddValidator($name, new StringLength(6, 20));
        if (Request::PostData('PasswordRepeat') || !$this->user->Exists())
        {
            $this->SetRequired($name);
        }
    }
private function AddPasswordField()
    {
        $name = 'Password';
        
        $this->AddField(Input::Password($name));
        //Password needs contain lower case letter, upper case letter, and a digit
        //$validator = new RegExp('/((?=.*\d)(?=.*[a-z])(?=.*[A-Z]))/');
        //$this->AddValidator($name, $validator);
        $this->AddValidator($name, new StringLength(6, 20));
        if (Request::PostData('PasswordRepeat') || !$this->user->Exists())
        {
            $this->SetRequired($name);
        }
    }
private function AddPasswordField ( ) { $ name = 'Password' ; $ this -> AddField ( Input :: Password ( $ name ) ) ; //Password needs contain lower case letter, upper case letter, and a digit //$validator = new RegExp('/((?=.*\d)(?=.*[a-z])(?=.*[A-Z]))/'); //$this->AddValidator($name, $validator); $ this -> AddValidator ( $ name , new StringLength ( 6 , 20 ) ) ; if ( Request :: PostData ( 'PasswordRepeat' ) || ! $ this -> user -> Exists ( ) ) { $ this -> SetRequired ( $ name ) ; } }
Adds the password field
Adds the password field