示例#1
0
 public function validate(\Nethgui\Controller\ValidationReportInterface $report)
 {
     $request = $this->getRequest();
     // restrict custom profile name to a common "variable name" grammar:
     if ($request->isMutation() && $this->parameters['profileName'] === 'custom') {
         $this->getValidator('customValue')->regexp('/^[a-z][a-z0-9]+$/i');
     }
     parent::validate($report);
 }