. */ /* */ /*************************************************************************************/ namespace Thelia\Form; use Symfony\Component\Validator\Constraints\Length; use Symfony\Component\Validator\Constraints\NotBlank; class AdminLogin extends BaseForm { protected function buildForm() { $this->formBuilder ->add("username", "text", array( "constraints" => array( new NotBlank(), new Length(array("min" => 3)) ) )) ->add("password", "password", array( "constraints" => array( new NotBlank() ) )) ->add("remember_me", "checkbox", array( 'value' => 'yes' )) ; } public function getName() { return "thelia_admin_login"; } }