wiki/content/20201112130710-notblank_constraint.md

26 lines
358 B
Markdown
Raw Permalink Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-11-12
2024-05-06 20:40:05 +00:00
id: ba104198-9038-4219-994e-503ee655d9f3
title: NotBlank Constraint
---
# Syntax
``` php
namespace App\Entity;
use Symfony\Component\Validator\Constraints as Assert;
class SomeEntity
{
/**
* @Assert\NotBlank()
*/
protected $someProperty;
}
```
## allowNull
[NotBlank allowNull](20201112130816-notblank_allownull)