Fixing 'required' property for form fields.
This commit is contained in:
parent
2c0c48d88e
commit
b2695ade8e
|
@ -11,8 +11,8 @@ class LoginType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('_username', TextType::class, ['mapped' => false])
|
->add('_username', TextType::class, ['mapped' => false, 'required' => true])
|
||||||
->add('_password', PasswordType::class, ['mapped' => false])
|
->add('_password', PasswordType::class, ['mapped' => false, 'required' => true])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ class PasswordResetRequestType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder->add('email', EmailType::class);
|
$builder->add('email', EmailType::class, ['required' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
|
|
@ -13,10 +13,10 @@ class RegisterType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('username', TextType::class)
|
->add('username', TextType::class, ['required' => true])
|
||||||
->add('password', PasswordType::class)
|
->add('password', PasswordType::class, ['required' => true])
|
||||||
->add('email', EmailType::class)
|
->add('email', EmailType::class, ['required' => true])
|
||||||
->add('inviteCode', TextType::class)
|
->add('inviteCode', TextType::class, ['required' => true])
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue