[FORM] Add Form::isRequired

This commit is contained in:
Hugo Sales 2020-07-25 17:50:23 +00:00 committed by Hugo Sales
parent 6adb527fe0
commit 1e911f1ba4
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -52,4 +52,9 @@ abstract class Form
}
return $fb->getForm();
}
public static function isRequired(array $form, string $field): bool
{
return $form[$field][2]['required'] ?? true;
}
}