6
6
use Symfony \Component \Form \AbstractType ;
7
7
use Symfony \Component \Form \Extension \Core \Type \CheckboxType ;
8
8
use Symfony \Component \Form \Extension \Core \Type \ChoiceType ;
9
- use Symfony \Component \Form \Extension \Core \Type \DateTimeType ;
10
9
use Symfony \Component \Form \Extension \Core \Type \DateType ;
11
- use Symfony \Component \Form \Extension \Core \Type \EmailType ;
12
- use Symfony \Component \Form \Extension \Core \Type \PasswordType ;
13
10
use Symfony \Component \Form \Extension \Core \Type \RangeType ;
14
11
use Symfony \Component \Form \Extension \Core \Type \TextType ;
15
12
use Symfony \Component \Form \FormBuilderInterface ;
16
- use Symfony \Component \OptionsResolver \OptionsResolver ;
17
- use Symfony \Component \Validator \Constraints \Email ;
18
- use Symfony \Component \Validator \Constraints \IsTrue ;
19
- use Symfony \Component \Validator \Constraints \Length ;
13
+ use Symfony \Component \Validator \Constraints \LessThan ;
20
14
use Symfony \Component \Validator \Constraints \NotBlank ;
21
15
use Symfony \Component \Validator \Constraints \NotNull ;
22
- use Symfony \Component \Validator \Constraints \Regex ;
23
16
use Symfony \Contracts \Translation \TranslatorInterface ;
24
17
25
18
class SignupFormFinalizeType extends AbstractType
@@ -64,6 +57,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
64
57
new NotBlank ([
65
58
'message ' => 'error.birthdate ' ,
66
59
]),
60
+ new LessThan ('-18years ' ),
67
61
],
68
62
])
69
63
->add ('gender ' , ChoiceType::class, [
@@ -124,7 +118,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
124
118
'label ' => 'signup.label.local_events ' ,
125
119
'required ' => false
126
120
])
127
- ->add ('trips_notifications ' , ChoiceType::class, [
121
+ /* ->add('trips_notifications', ChoiceType::class, [
128
122
'label' => 'label.trips_notifications',
129
123
'help' => 'help.trips_notifications',
130
124
'expanded' => false,
@@ -139,6 +133,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
139
133
],
140
134
'required' => false,
141
135
])
136
+ */
142
137
;
143
138
}
144
139
}
0 commit comments