From dab5ee08b06ad397e6c0c82f2fb09358873a0fc3 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 22 Dec 2020 13:59:57 +0100 Subject: [PATCH] Add `IPatternFormField` --- .../builder/field/IPatternFormField.class.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/form/builder/field/IPatternFormField.class.php diff --git a/wcfsetup/install/files/lib/system/form/builder/field/IPatternFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/IPatternFormField.class.php new file mode 100644 index 0000000000..577e221dcc --- /dev/null +++ b/wcfsetup/install/files/lib/system/form/builder/field/IPatternFormField.class.php @@ -0,0 +1,28 @@ + + * @package WoltLabSuite\Core\System\Form\Builder\Field + * @see https://html.spec.whatwg.org/multipage/input.html#attr-input-pattern + * @since 5.4 + */ +interface IPatternFormField { + /** + * Returns the `pattern` attribute of the form field. + * + * If `null` is returned, no `pattern` attribute will be set. + */ + public function getPattern(): ?string; + + /** + * Sets the `pattern` attribute of the form field. + * + * If `null` is given, the attribute is unset. + */ + public function pattern(?string $pattern): self; +} -- 2.20.1