diff --git a/docs/book/element/phone-number.md b/docs/book/element/phone-number.md index 2fc02e2..a92d840 100644 --- a/docs/book/element/phone-number.md +++ b/docs/book/element/phone-number.md @@ -2,6 +2,8 @@ `Laminas\I18n\PhoneNumber\Form\Element\PhoneNumber` is a text input form element that automatically attaches a PhoneNumber validator. +--8<-- "installation-requirements.md" + ## Basic Usage This element automatically adds a `type` attribute of value `tel`. diff --git a/docs/book/filters/to-e164.md b/docs/book/filters/to-e164.md index a94cf7b..cc211c3 100755 --- a/docs/book/filters/to-e164.md +++ b/docs/book/filters/to-e164.md @@ -2,6 +2,8 @@ The `ToE164` filter can be used to format phone numbers to [E.164 format](https://en.wikipedia.org/wiki/E.164). +--8<-- "installation-requirements.md" + ## Basic Usage ```php diff --git a/docs/book/filters/to-international-phone-number.md b/docs/book/filters/to-international-phone-number.md index 5c1ce57..d235ad8 100755 --- a/docs/book/filters/to-international-phone-number.md +++ b/docs/book/filters/to-international-phone-number.md @@ -2,6 +2,8 @@ The `ToInternationalPhoneNumber` filter can be used to format phone numbers to the international format expected by the region the phone number belongs to. +--8<-- "installation-requirements.md" + ## Basic Usage ```php diff --git a/docs/book/filters/to-national-phone-number.md b/docs/book/filters/to-national-phone-number.md index ec19b1d..4106572 100755 --- a/docs/book/filters/to-national-phone-number.md +++ b/docs/book/filters/to-national-phone-number.md @@ -2,6 +2,8 @@ The `ToNationalPhoneNumber` filter can be used to format phone numbers to the national format expected by the region the phone number belongs to. +--8<-- "installation-requirements.md" + ## Basic Usage ```php diff --git a/docs/book/helper/phone-number-format.md b/docs/book/helper/phone-number-format.md index 782532b..9ab2fc4 100644 --- a/docs/book/helper/phone-number-format.md +++ b/docs/book/helper/phone-number-format.md @@ -2,6 +2,8 @@ The `Laminas\I18n\PhoneNumber\View\Helper\PhoneNumberFormat` view helper provides a convenient way of formatting phone numbers in projects that make use of [`laminas/laminas-view`](https://docs.laminas.dev/laminas-view/). +--8<-- "installation-requirements.md" + ## Basic Usage The helper is aliased to `phoneNumberFormat` so within view scripts, it can be invoked in the following way: diff --git a/docs/book/validators/phone-number.md b/docs/book/validators/phone-number.md index 470ee93..705790c 100644 --- a/docs/book/validators/phone-number.md +++ b/docs/book/validators/phone-number.md @@ -3,6 +3,8 @@ `Laminas\I18n\PhoneNumber\Validator\PhoneNumber` allows you to determine if a given value **is a valid phone number**. Phone number formats are country specific. +--8<-- "installation-requirements.md" + ## Basic Usage ```php diff --git a/docs/snippets/installation-requirements.md b/docs/snippets/installation-requirements.md new file mode 100644 index 0000000..20de934 --- /dev/null +++ b/docs/snippets/installation-requirements.md @@ -0,0 +1,6 @@ +> MISSING: **Installation Requirements** +> The support for phone numbers is based on the laminas-i18n-phone-number component, so be sure to have it installed before getting started: +> +> ```bash +> $ composer require laminas/laminas-i18n-phone-number +> ```