I have following code

        $validatorMobilePhone = new sfValidatorAnd(
            array(
                new sfValidatorRegex(
                    array(
                        'required' => false,
                        'pattern'  => '/^[0-9()]$/i'
                    ),
                    array('invalid'  => 'Mobile phone number must contain
only numerals and "()"')
                ),
                new sfValidatorString(
                    array(
                        'required' => false,
                        'min_length' => 11,
                        'max_length' => 15
                    ),
                    array(
                        'min_length' => 'Mobile phone number can not be less
11 characters',
                        'max_length' => 'Mobile phone number can not be more
15 characters',
                    )
                )
            )
        );

I have been set in both validators (sfValidatorString and sfValidatorRegex)
required false, why appears error "Required" on submit form? I think the
sfValidatorAnd set field required. Is it correct?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to