Created
May 6, 2012 09:31
-
-
Save coreymcmahon/2621240 to your computer and use it in GitHub Desktop.
Using annotations to define validation constraints - http://www.symfonycentral.com/symfony-does-validation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/MyCompany/BlogBundle/Entity/Article.php | |
use Symfony\Component\Validator\Constraints as Assert; | |
class Article | |
{ | |
/** | |
* @Assert\NotBlank() | |
*/ | |
public $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment