Skip to content

Instantly share code, notes, and snippets.

@Bendihossan
Created March 6, 2013 10:52
Show Gist options
  • Save Bendihossan/5098508 to your computer and use it in GitHub Desktop.
Save Bendihossan/5098508 to your computer and use it in GitHub Desktop.
<?php
// ...
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add(
'email',
'email',
array(
'label' => 'Email',
'constraints' => new Email(),
)
);
$builder->add(
'termsandconditions',
'checkbox',
array(
'label' => 'sso.terms-and-conditions',
'constraints' => new NotNull(),
'mapped' => false
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment