Add extend function in getSchemaValidation function

This allows to create extensions which add validation list
This commit is contained in:
shoosah 2019-05-14 09:47:14 +12:00
parent e7bb508391
commit 4da8be3bf5

View File

@ -1609,9 +1609,11 @@ class FormField extends RequestHandler
*/
public function getSchemaValidation()
{
$validationList = [];
if ($this->Required()) {
return [ 'required' => true ];
$validationList['required'] = true;
}
return [];
$this->extend('updateSchemaValidation', $validationList);
return $validationList;
}
}