From 49c73356163ebaa214f7c929390f3b9892c45b03 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 15 Jan 2021 12:04:42 +0100 Subject: [PATCH] Document `IPatternFormField` (#120) --- docs/php/api/form_builder-form_fields.md | 2 +- docs/php/api/form_builder-structure.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/php/api/form_builder-form_fields.md b/docs/php/api/form_builder-form_fields.md index 5c0d0e26..2832c69d 100644 --- a/docs/php/api/form_builder-form_fields.md +++ b/docs/php/api/form_builder-form_fields.md @@ -166,7 +166,7 @@ If the field is nullable and the current form field value is considered `empty` ### `TextFormField` `TextFormField` is a form field that allows entering a single line of text. -The class implements `IImmutableFormField`, `II18nFormField`, `IMaximumLengthFormField`, `IMinimumLengthFormField`, and `IPlaceholderFormField`. +The class implements `IImmutableFormField`, `II18nFormField`, `IMaximumLengthFormField`, `IMinimumLengthFormField`, `IPatternFormField`, and `IPlaceholderFormField`. ### `TitleFormField` diff --git a/docs/php/api/form_builder-structure.md b/docs/php/api/form_builder-structure.md index adfe1cf0..c25d45da 100644 --- a/docs/php/api/form_builder-structure.md +++ b/docs/php/api/form_builder-structure.md @@ -362,6 +362,13 @@ The implementing class has to implement the methods `packageIDs(array $packageID `TPackagesFormField` provides a default implementation of these two methods. +#### `IPatternFormField` + +`IPatternFormField` has to be implemented by form fields that support the [`pattern` attribute](https://html.spec.whatwg.org/multipage/input.html#the-pattern-attribute). +The implementing class has to implement the methods `pattern(?string $pattern): self` and `getPattern(): ?string`, which are used to set and get the pattern, respectively. +`TPatternFormField` provides a default implementation of these two methods. + + #### `IPlaceholderFormField` `IPlaceholderFormField` has to be implemented by form fields that support a placeholder value for empty fields. -- 2.20.1