mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8979 from silverstripe-terraformers/feature/add-extension-for-schema-validation
Add extend function in getSchemaValidation function
This commit is contained in:
commit
32c04ce765
@ -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