mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-06 02:59:29 +00:00
Use a proper range constraint on the form
Otherwise it is possible to inject invalid data
This commit is contained in:
parent
41a7238ab7
commit
a399b629d1
1 changed files with 5 additions and 2 deletions
|
|
@ -59,7 +59,10 @@ class FieldToProviderMappingType extends AbstractType
|
|||
'max' => 10,
|
||||
'class' => 'form-control-sm',
|
||||
'style' => 'width: 80px;'
|
||||
]
|
||||
],
|
||||
'constraints' => [
|
||||
new \Symfony\Component\Validator\Constraints\Range(['min' => 1, 'max' => 10]),
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue