mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Add extend function in getSchemaValidation function
This allows to create extensions which add validation list
This commit is contained in:
parent
e7bb508391
commit
4da8be3bf5
@ -1609,9 +1609,11 @@ class FormField extends RequestHandler
|
|||||||
*/
|
*/
|
||||||
public function getSchemaValidation()
|
public function getSchemaValidation()
|
||||||
{
|
{
|
||||||
|
$validationList = [];
|
||||||
if ($this->Required()) {
|
if ($this->Required()) {
|
||||||
return [ 'required' => true ];
|
$validationList['required'] = true;
|
||||||
}
|
}
|
||||||
return [];
|
$this->extend('updateSchemaValidation', $validationList);
|
||||||
|
return $validationList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user