mirror of
https://github.com/alrayyes/wiki.git
synced 2025-07-20 00:03:26 +00:00
Quartz sync: May 6, 2024, 10:40 PM
This commit is contained in:
parent
aee9145691
commit
4ef8371441
635 changed files with 22281 additions and 6 deletions
21
content/20201112125637-symfony_json_constraint.md
Normal file
21
content/20201112125637-symfony_json_constraint.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
id: 4e20e5e5-06b6-4280-9cd0-7b08585a762b
|
||||
title: Symfony JSON Constraint
|
||||
---
|
||||
|
||||
# Syntax
|
||||
|
||||
``` php
|
||||
// src/Entity/Book.php
|
||||
namespace App\Entity;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
class Book
|
||||
{
|
||||
/**
|
||||
* @Assert\Json(message = "This is not valid JSON")
|
||||
*/
|
||||
protected $chapters;
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue