public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name', 'text', ['label' => 'name', 'required' => true, 'attr' => ['class' => "validate[required]"]]); }