forked from GNUsocial/gnu-social
[FORM] Add Form::isRequired
This commit is contained in:
parent
d6a7843240
commit
2838aaad14
|
@ -52,4 +52,9 @@ abstract class Form
|
||||||
}
|
}
|
||||||
return $fb->getForm();
|
return $fb->getForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function isRequired(array $form, string $field): bool
|
||||||
|
{
|
||||||
|
return $form[$field][2]['required'] ?? true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue