disable domain check in emailaddress validation

parent 6ff98cd8
......@@ -107,12 +107,7 @@ class ApplicationForm
];
}
// todo replace with labs from service
$labs = array_map(function ($bean) {
return $bean->export();
}, \RedBeanPHP\R::findAll('lab', ' school_id = ? ', [$school->id]));
// $labs = $this->labService->getLabsBySchoolId($school->id);
$labs = $this->labService->getLabsBySchoolId($school->id);
$res = $this->view->render($res, 'application_form/form.twig', [
'lab_choices' => array_map(function ($lab) {
......
......@@ -63,7 +63,9 @@ class ApplicationForm extends InputFilter
$submittedBy->setRequired(true)
->getValidatorChain()
->attach(new Validator\NotEmpty())
->attach(new Validator\EmailAddress());
->attach(new Validator\EmailAddress([
'useDomainCheck' => false,
]));
$this->add($schoolId)
->add($applyFor)
......
......@@ -86,7 +86,9 @@ class School
$email = new Input('email');
$email->setRequired(false)
->getValidatorChain()
->attach(new Validator\EmailAddress());
->attach(new Validator\EmailAddress([
'useDomainCheck' => false,
]));
$municipality = new Input('municipality');
$municipality->setRequired(true)
......@@ -117,7 +119,9 @@ class School
$creator = new Input('creator');
$creator->setRequired(true)
->getValidatorChain()
->attach(new Validator\EmailAddress());
->attach(new Validator\EmailAddress([
'useDomainCheck' => false,
]));
$this->inputFilter = new InputFilter();
$this->inputFilter
......
......@@ -45,7 +45,9 @@ class Teacher
$email->setRequired(true)
->getValidatorChain()
->attach(new Validator\NotEmpty())
->attach(new Validator\EmailAddress());
->attach(new Validator\EmailAddress([
'useDomainCheck' => false,
]));
$telephone = new Input('telephone');
$telephone->setRequired(true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment