Fix broken documentation links

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2024-02-19 11:23:29 +01:00
parent d8cd6a30e0
commit 543b97309a
No known key found for this signature in database
GPG key ID: 221E9281655813A6
25 changed files with 57 additions and 28 deletions

View file

@ -9,9 +9,9 @@
The most awesome validation engine ever created for PHP. The most awesome validation engine ever created for PHP.
- Complex rules made simple: `v::numericVal()->positive()->between(1, 255)->validate($input)`. - Complex rules made simple: `v::numericVal()->positive()->between(1, 255)->validate($input)`.
- [Granularity control](docs/feature-guide.md#validation-methods) for advanced reporting. - [Granularity control](docs/02-feature-guide.md#validation-methods) for advanced reporting.
- [More than 150](docs/list-of-rules.md) (fully tested) validation rules. - [More than 150](docs/08-list-of-rules-by-category.md) (fully tested) validation rules.
- [A concrete API](docs/concrete-api.md) for non fluent usage. - [A concrete API](docs/05-concrete-api.md) for non fluent usage.
Learn More: Learn More:

View file

@ -36,7 +36,7 @@ create_rule_documentation()
local rule=${1} local rule=${1}
local related_rules=${2} local related_rules=${2}
local filename="${DOCS_DIREECTORY}/rules/${rule}.md" local filename="${DOCS_DIREECTORY}/rules/${rule}.md"
local links=$(egrep '^\[.+\]: .+' "${filename}") local links=$(ggrep -E '^\[.+\]: .+' "${filename}")
local related_links=$( local related_links=$(
tr ':' '\n' <<< ${related_rules} | tr ':' '\n' <<< ${related_rules} |
sort -u | sort -u |
@ -46,10 +46,10 @@ create_rule_documentation()
) )
# "Description" section # "Description" section
sed -nE '/^# /,/^## Changelog/p' "${filename}" | egrep -v '^## Changelog' sed -nE '/^# /,/^## Changelog/p' "${filename}" | ggrep -E -v '^## Changelog'
# "Changelog" section # "Changelog" section
sed -nE '/^## Changelog/,/^\*\*\*/p' "${filename}" | fgrep -v '***' sed -nE '/^## Changelog/,/^\*\*\*/p' "${filename}" | ggrep -Fv '***'
# "See also" section # "See also" section
echo "***" echo "***"
@ -78,7 +78,7 @@ create_list_of_rules()
echo "Creating list of rules" echo "Creating list of rules"
{ {
echo "# List of rules" echo "# List of rules by category"
echo echo
for category in $(list_categories); do for category in $(list_categories); do
echo "## ${category}" echo "## ${category}"
@ -91,7 +91,7 @@ create_list_of_rules()
echo "## Alphabetically" echo "## Alphabetically"
echo echo
ls -1 "${DOCS_DIREECTORY}/rules/" | sort | sed -E 's,^(.+).md$,- [\1](rules/\1.md),' ls -1 "${DOCS_DIREECTORY}/rules/" | sort | sed -E 's,^(.+).md$,- [\1](rules/\1.md),'
} > "${DOCS_DIREECTORY}/list-of-rules.md" } > "${DOCS_DIREECTORY}/08-list-of-rules-by-category.md"
} }
link_related_rules() link_related_rules()
@ -101,7 +101,7 @@ link_related_rules()
echo "Building list of related rules" echo "Building list of related rules"
for rule in $(list_rules); do for rule in $(list_rules); do
declare filename="${DOCS_DIREECTORY}/rules/${rule}.md" declare filename="${DOCS_DIREECTORY}/rules/${rule}.md"
declare related_rules=$(egrep '\[.+\]\(.+\.md\)' "${filename}" | declare related_rules=$(ggrep -E '\[.+\]\(.+\.md\)' "${filename}" |
sed -E 's,.*\[.+\]\((.+)\.md\).*,\1,' | sed -E 's,.*\[.+\]\((.+)\.md\).*,\1,' |
grep -v 'comparable-values') grep -v 'comparable-values')

View file

@ -112,16 +112,14 @@
- [Pesel](rules/Pesel.md) - [Pesel](rules/Pesel.md)
- [Pis](rules/Pis.md) - [Pis](rules/Pis.md)
- [PolishIdCard](rules/PolishIdCard.md) - [PolishIdCard](rules/PolishIdCard.md)
- [PortugueseNif](rules/PortugueseNif.md)
## Integrations
- [Sf](rules/Sf.md)
## Internet ## Internet
- [Domain](rules/Domain.md) - [Domain](rules/Domain.md)
- [Email](rules/Email.md) - [Email](rules/Email.md)
- [Ip](rules/Ip.md) - [Ip](rules/Ip.md)
- [PublicDomainSuffix](rules/PublicDomainSuffix.md)
- [Tld](rules/Tld.md) - [Tld](rules/Tld.md)
- [Url](rules/Url.md) - [Url](rules/Url.md)
- [VideoUrl](rules/VideoUrl.md) - [VideoUrl](rules/VideoUrl.md)
@ -382,17 +380,18 @@
- [PhpLabel](rules/PhpLabel.md) - [PhpLabel](rules/PhpLabel.md)
- [Pis](rules/Pis.md) - [Pis](rules/Pis.md)
- [PolishIdCard](rules/PolishIdCard.md) - [PolishIdCard](rules/PolishIdCard.md)
- [PortugueseNif](rules/PortugueseNif.md)
- [Positive](rules/Positive.md) - [Positive](rules/Positive.md)
- [PostalCode](rules/PostalCode.md) - [PostalCode](rules/PostalCode.md)
- [PrimeNumber](rules/PrimeNumber.md) - [PrimeNumber](rules/PrimeNumber.md)
- [Printable](rules/Printable.md) - [Printable](rules/Printable.md)
- [PublicDomainSuffix](rules/PublicDomainSuffix.md)
- [Punct](rules/Punct.md) - [Punct](rules/Punct.md)
- [Readable](rules/Readable.md) - [Readable](rules/Readable.md)
- [Regex](rules/Regex.md) - [Regex](rules/Regex.md)
- [ResourceType](rules/ResourceType.md) - [ResourceType](rules/ResourceType.md)
- [Roman](rules/Roman.md) - [Roman](rules/Roman.md)
- [ScalarVal](rules/ScalarVal.md) - [ScalarVal](rules/ScalarVal.md)
- [Sf](rules/Sf.md)
- [Size](rules/Size.md) - [Size](rules/Size.md)
- [Slug](rules/Slug.md) - [Slug](rules/Slug.md)
- [Sorted](rules/Sorted.md) - [Sorted](rules/Sorted.md)

View file

@ -3,6 +3,6 @@
The most awesome validation engine ever created for PHP. The most awesome validation engine ever created for PHP.
- Complex rules made simple: `v::numericVal()->positive()->between(1, 255)->validate($input)`. - Complex rules made simple: `v::numericVal()->positive()->between(1, 255)->validate($input)`.
- [Granularity control](feature-guide.md#validation-methods) for advanced reporting. - [Granularity control](02-feature-guide.md#validation-methods) for advanced reporting.
- [More than 150](list-of-rules.md) (fully tested) validation rules. - [More than 150](08-list-of-rules-by-category.md) (fully tested) validation rules.
- [A concrete API](concrete-api.md) for non fluent usage. - [A concrete API](05-concrete-api.md) for non fluent usage.

View file

@ -11,7 +11,7 @@ v::intVal()->between(10, 20)->validate(20); // true
``` ```
Validation makes comparison easier, check out our supported Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md). [comparable values](../07-comparable-values.md).
Message template for this validator includes `{{minValue}}` and `{{maxValue}}`. Message template for this validator includes `{{minValue}}` and `{{maxValue}}`.

View file

@ -26,3 +26,4 @@ See also:
- [Cpf](Cpf.md) - [Cpf](Cpf.md)
- [Imei](Imei.md) - [Imei](Imei.md)
- [Nif](Nif.md) - [Nif](Nif.md)
- [PortugueseNif](PortugueseNif.md)

View file

@ -27,4 +27,5 @@ See also:
- [Call](Call.md) - [Call](Call.md)
- [CallableType](CallableType.md) - [CallableType](CallableType.md)
- [DateTime](DateTime.md)
- [FilterVar](FilterVar.md) - [FilterVar](FilterVar.md)

View file

@ -28,3 +28,4 @@ See also:
- [NfeAccessKey](NfeAccessKey.md) - [NfeAccessKey](NfeAccessKey.md)
- [Nif](Nif.md) - [Nif](Nif.md)
- [Pis](Pis.md) - [Pis](Pis.md)
- [PortugueseNif](PortugueseNif.md)

View file

@ -25,3 +25,4 @@ See also:
- [NfeAccessKey](NfeAccessKey.md) - [NfeAccessKey](NfeAccessKey.md)
- [Nif](Nif.md) - [Nif](Nif.md)
- [Pis](Pis.md) - [Pis](Pis.md)
- [PortugueseNif](PortugueseNif.md)

View file

@ -41,6 +41,7 @@ See also:
- [CurrencyCode](CurrencyCode.md) - [CurrencyCode](CurrencyCode.md)
- [LanguageCode](LanguageCode.md) - [LanguageCode](LanguageCode.md)
- [PostalCode](PostalCode.md) - [PostalCode](PostalCode.md)
- [PublicDomainSuffix](PublicDomainSuffix.md)
- [SubdivisionCode](SubdivisionCode.md) - [SubdivisionCode](SubdivisionCode.md)
- [Tld](Tld.md) - [Tld](Tld.md)

View file

@ -41,3 +41,4 @@ See also:
- [NfeAccessKey](NfeAccessKey.md) - [NfeAccessKey](NfeAccessKey.md)
- [Nif](Nif.md) - [Nif](Nif.md)
- [Pis](Pis.md) - [Pis](Pis.md)
- [PortugueseNif](PortugueseNif.md)

View file

@ -58,3 +58,12 @@ See also:
- [Luhn](Luhn.md) - [Luhn](Luhn.md)
- [NoWhitespace](NoWhitespace.md) - [NoWhitespace](NoWhitespace.md)
- [Regex](Regex.md) - [Regex](Regex.md)
***
See also:
- [Decimal](Decimal.md)
- [Digit](Digit.md)
- [Iban](Iban.md)
- [Luhn](Luhn.md)
- [NoWhitespace](NoWhitespace.md)
- [Regex](Regex.md)

View file

@ -1,4 +1,3 @@
# DateTime # DateTime
- `DateTime()` - `DateTime()`
@ -72,6 +71,7 @@ v::dateTime(DateTime::RFC3339_EXTENDED)->validate($input); // false
See also: See also:
- [Between](Between.md) - [Between](Between.md)
- [Callback](Callback.md)
- [Date](Date.md) - [Date](Date.md)
- [LeapDate](LeapDate.md) - [LeapDate](LeapDate.md)
- [LeapYear](LeapYear.md) - [LeapYear](LeapYear.md)

View file

@ -46,6 +46,7 @@ See also:
- [Ip](Ip.md) - [Ip](Ip.md)
- [Json](Json.md) - [Json](Json.md)
- [MacAddress](MacAddress.md) - [MacAddress](MacAddress.md)
- [PublicDomainSuffix](PublicDomainSuffix.md)
- [Tld](Tld.md) - [Tld](Tld.md)
- [Url](Url.md) - [Url](Url.md)

View file

@ -10,7 +10,7 @@ v::greaterThan(10)->validate(9); // false
``` ```
Validation makes comparison easier, check out our supported Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md). [comparable values](../07-comparable-values.md).
Message template for this validator includes `{{compareTo}}`. Message template for this validator includes `{{compareTo}}`.

View file

@ -50,6 +50,7 @@ See also:
- [Domain](Domain.md) - [Domain](Domain.md)
- [MacAddress](MacAddress.md) - [MacAddress](MacAddress.md)
- [PublicDomainSuffix](PublicDomainSuffix.md)
- [Tld](Tld.md) - [Tld](Tld.md)
[filter_var()]: https://php.net/filter_var [filter_var()]: https://php.net/filter_var

View file

@ -10,7 +10,7 @@ v::lessThan(10)->validate(10); // false
``` ```
Validation makes comparison easier, check out our supported Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md). [comparable values](../07-comparable-values.md).
Message template for this validator includes `{{compareTo}}`. Message template for this validator includes `{{compareTo}}`.

View file

@ -25,4 +25,5 @@ See also:
- [Domain](Domain.md) - [Domain](Domain.md)
- [Iban](Iban.md) - [Iban](Iban.md)
- [Ip](Ip.md) - [Ip](Ip.md)
- [PublicDomainSuffix](PublicDomainSuffix.md)
- [Tld](Tld.md) - [Tld](Tld.md)

View file

@ -11,7 +11,7 @@ v::max(10)->validate(11); // false
``` ```
Validation makes comparison easier, check out our supported Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md). [comparable values](../07-comparable-values.md).
Message template for this validator includes `{{compareTo}}`. Message template for this validator includes `{{compareTo}}`.

View file

@ -11,7 +11,7 @@ v::intVal()->min(10)->validate(11); // true
``` ```
Validation makes comparison easier, check out our supported Validation makes comparison easier, check out our supported
[comparable values](../comparable-values.md). [comparable values](../07-comparable-values.md).
Message template for this validator includes `{{compareTo}}`. Message template for this validator includes `{{compareTo}}`.

View file

@ -17,7 +17,7 @@ v::nif()->validate('P6437358A'); // false
Version | Description Version | Description
--------|------------- --------|-------------
2.0.0 | Created 2.2.0 | Created
*** ***
See also: See also:
@ -26,3 +26,4 @@ See also:
- [Cnh](Cnh.md) - [Cnh](Cnh.md)
- [Cnpj](Cnpj.md) - [Cnpj](Cnpj.md)
- [Cpf](Cpf.md) - [Cpf](Cpf.md)
- [PortugueseNif](PortugueseNif.md)

View file

@ -1,4 +1,4 @@
# Portuguese NIF # PortugueseNif
- `PortugueseNif()` - `PortugueseNif()`
@ -13,7 +13,17 @@ v::portugueseNif()->validate('220005245'); // false
- Identifications - Identifications
## Changelog
| Version | Description |
| ------: | ----------- |
| 2.2.0 | Created |
*** ***
See also: See also:
- [Nif](Nif.md) - [Bsn](Bsn.md)
- [Cnh](Cnh.md)
- [Cnpj](Cnpj.md)
- [Cpf](Cpf.md)
- [Nif](Nif.md)

View file

@ -31,9 +31,9 @@ Version | Description
*** ***
See also: See also:
- [Tld](Tld.md)
- [CountryCode](CountryCode.md) - [CountryCode](CountryCode.md)
- [Domain](Domain.md) - [Domain](Domain.md)
- [Ip](Ip.md) - [Ip](Ip.md)
- [MacAddress](MacAddress.md) - [MacAddress](MacAddress.md)
- [SubdivisionCode](SubdivisionCode.md) - [SubdivisionCode](SubdivisionCode.md)
- [Tld](Tld.md)

View file

@ -33,6 +33,7 @@ See also:
- [Nip](Nip.md) - [Nip](Nip.md)
- [Pesel](Pesel.md) - [Pesel](Pesel.md)
- [PolishIdCard](PolishIdCard.md) - [PolishIdCard](PolishIdCard.md)
- [PublicDomainSuffix](PublicDomainSuffix.md)
- [Tld](Tld.md) - [Tld](Tld.md)
[iso-codes]: https://salsa.debian.org/iso-codes-team/iso-codes [iso-codes]: https://salsa.debian.org/iso-codes-team/iso-codes

View file

@ -28,5 +28,5 @@ See also:
- [Domain](Domain.md) - [Domain](Domain.md)
- [Ip](Ip.md) - [Ip](Ip.md)
- [MacAddress](MacAddress.md) - [MacAddress](MacAddress.md)
- [SubdivisionCode](SubdivisionCode.md)
- [PublicDomainSuffix](PublicDomainSuffix.md) - [PublicDomainSuffix](PublicDomainSuffix.md)
- [SubdivisionCode](SubdivisionCode.md)