```php
namespace Topxia\LiftBundle\Form;

use Symfony\Component\Validator\Constraint as Assert;

class AddUser {

    /**
     * @Assert\NotBlank(message="用户名不能为空")
     */
    public $username;

    /**
     * @Assert\NotBlank(message="用户姓名不能为空")
     */
    public $name;

    /**
     * @Assert\NotBlank(message="密码不能为空")
     * @Assert\MinLength(limit=4,message="密码太短了")
     * @Assert\MaxLength(limit=24,message="密码太长了")
     */
    public $password;

    /**
     * @Assert\NotBlank(message="密码不能为空")
     */
    public $rpassword;

    /**
     * @Assert\NotBlank(message="邮箱格式不正确")
     * @Assert\Email(message="邮箱格式不正确")
     */
    public $email;

    /**
     * @Assert\NotBlank(message="k3系统编号不能为空")
     */
    public $num;

    /**
     * @Assert\NotBlank()
     * @Assert\Choice({"0", "1", "2", "3", "4"})
     */
    public $roles;

    public $changePassword;
}

```

---

```php
<?php
// src/Topxia/LiftBundle/Form/AddUserType.php

namespace Topxia\LiftBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class AddUserType extends AbstractType{

    public function buildForm(FormBuilder $builder, array $options){
        $builder->add('username', 'text', array('label' => '用户姓名'));
        $builder->add('name', 'text', array('label' => '用户名'));
        $builder->add('password', 'password', array('label' => '密码'));
        $builder->add('rpassword', 'password', array('label' => '重复密码'));
        $builder->add('email', 'email', array('label' => '邮件'));
        $builder->add('num', 'text', array('label' => 'K3系统编号'));
        $builder->add('roles', 'choice', array('label' => '用户组', 'multiple'  => false, 'expanded' => true,
                'choices' => array(
                    '0' => '超级管理员',
                    '1' => '仓库管理员',
                    '2' => '采购管理员',
                    '3' => '采购员',
                    '4' => '供应商'
        ),
        ));
        $builder->add('changePassword', 'checkbox', array('label' => '登录修改密码',  'value' => '1'));
    }

    public function getName(){
        return 'add_user';
    }

}

```

when i use $form->bindRequest($request); in controller there is an error :
[Semantical Error] The annotation "@Symfony\Component\Validator\Constraint\NotBlank" in property Topxia\LiftBundle\Form\AddUser::$username does not exist, or could not be auto-loaded.
500 Internal Server Error - AnnotationException
I have no idea about this.
Thanks