Skip to content

Commit 8e77021

Browse files
committed
Reformat documentation files
There was some inconsistent Markdown, and some links were out of sync.
1 parent 7636944 commit 8e77021

30 files changed

+124
-105
lines changed

bin/update-doc-links

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ create_rule_documentation()
4949
sed -nE '/^# /,/^## Changelog/p' "${filename}" | ggrep -E -v '^## Changelog'
5050

5151
# "Changelog" section
52-
sed -nE '/^## Changelog/,/^\*\*\*/p' "${filename}" | ggrep -Fv '***'
52+
sed -nE '/^## Changelog/,/^---/p' "${filename}"
5353

5454
# "See also" section
55-
echo "***"
55+
echo
5656
echo "See also:"
5757
echo
5858
echo "${related_links}"

docs/02-feature-guide.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ The `Validator` class is the core of Respect\Validation, offering a fluent inter
44

55
For convenience, the `Validator` class is aliased as `v`. This means you can write `v::intType()` instead of `\Respect\Validation\Validator::intType()`.
66

7-
87
## Validating using booleans
98

109
With the `isValid()` method, determine if your input meets a specific validation rule.

docs/04-message-translation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We use dependency injection container to create Validators with all their depend
44

55
You can use different translators to translate validation messages into different languages, by overwriting the default container in `ContainerRegistry`, passing the translator you desire.
66

7-
Luckily, the `ContainerRegistry` has method that creates a pre-configured container using [php-di/php-di](https://php-di.org/). That means you just need to overwrite that service.
7+
Luckily, the `ContainerRegistry` has method that creates a pre-configured container using [php-di/php-di](https://php-di.org/). That means you just need to overwrite that service.
88

99
```php
1010
use Respect\Validation\ContainerRegistry;

docs/08-comparable-values.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ You can make comparison with the following data types:
1010
- Numeric types
1111
- Single character string
1212
- Primitive types in general: normal operation comparison made by PHP
13-
- Time string: [date and time format](http://php.net/datetime.formats)
14-
that can be parsed by PHP
13+
- Time string: [date and time format](http://php.net/datetime.formats)
14+
that can be parsed by PHP
1515

1616
Below you can see some examples:
1717

docs/09-list-of-rules-by-category.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@
101101
- [Uploaded](rules/Uploaded.md)
102102
- [Writable](rules/Writable.md)
103103

104-
## ISO codes
105-
106-
- [CountryCode](rules/CountryCode.md)
107-
- [CurrencyCode](rules/CurrencyCode.md)
108-
- [LanguageCode](rules/LanguageCode.md)
109-
- [SubdivisionCode](rules/SubdivisionCode.md)
110-
111104
## Identifications
112105

113106
- [Bsn](rules/Bsn.md)
@@ -137,6 +130,13 @@
137130
- [Url](rules/Url.md)
138131
- [VideoUrl](rules/VideoUrl.md)
139132

133+
## ISO codes
134+
135+
- [CountryCode](rules/CountryCode.md)
136+
- [CurrencyCode](rules/CurrencyCode.md)
137+
- [LanguageCode](rules/LanguageCode.md)
138+
- [SubdivisionCode](rules/SubdivisionCode.md)
139+
140140
## Localization
141141

142142
- [CountryCode](rules/CountryCode.md)
@@ -235,8 +235,8 @@
235235
- [In](rules/In.md)
236236
- [Json](rules/Json.md)
237237
- [Lowercase](rules/Lowercase.md)
238-
- [NoWhitespace](rules/NoWhitespace.md)
239238
- [NotEmoji](rules/NotEmoji.md)
239+
- [NoWhitespace](rules/NoWhitespace.md)
240240
- [Phone](rules/Phone.md)
241241
- [PhpLabel](rules/PhpLabel.md)
242242
- [PostalCode](rules/PostalCode.md)
@@ -401,13 +401,13 @@
401401
- [Nif](rules/Nif.md)
402402
- [Nip](rules/Nip.md)
403403
- [No](rules/No.md)
404-
- [NoWhitespace](rules/NoWhitespace.md)
405404
- [NoneOf](rules/NoneOf.md)
406405
- [Not](rules/Not.md)
407406
- [NotBlank](rules/NotBlank.md)
408407
- [NotEmoji](rules/NotEmoji.md)
409408
- [NotEmpty](rules/NotEmpty.md)
410409
- [NotUndef](rules/NotUndef.md)
410+
- [NoWhitespace](rules/NoWhitespace.md)
411411
- [NullOr](rules/NullOr.md)
412412
- [NullType](rules/NullType.md)
413413
- [Number](rules/Number.md)

docs/rules/Alnum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ See also:
7171
- [Decimal](Decimal.md)
7272
- [Digit](Digit.md)
7373
- [Lowercase](Lowercase.md)
74-
- [NoWhitespace](NoWhitespace.md)
7574
- [NotEmoji](NotEmoji.md)
75+
- [NoWhitespace](NoWhitespace.md)
7676
- [Regex](Regex.md)
7777
- [StringType](StringType.md)
7878
- [StringVal](StringVal.md)

docs/rules/Alpha.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ See also:
6565
- [Decimal](Decimal.md)
6666
- [Digit](Digit.md)
6767
- [Lowercase](Lowercase.md)
68-
- [NoWhitespace](NoWhitespace.md)
6968
- [NotEmoji](NotEmoji.md)
69+
- [NoWhitespace](NoWhitespace.md)
7070
- [Regex](Regex.md)
7171
- [Uppercase](Uppercase.md)
7272
- [Vowel](Vowel.md)

docs/rules/AlwaysValid.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ v::alwaysValid()->isValid('whatever'); // true
3838
See also:
3939

4040
- [AlwaysInvalid](AlwaysInvalid.md)
41+
- [KeyExists](KeyExists.md)
42+
- [PropertyExists](PropertyExists.md)

docs/rules/Attributes.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ v::attributes()->assert(new Person('', 'not a date', 'not an email', 'not a phon
7070

7171
## Caveats
7272

73-
* If the object has no attributes, the validation will always pass.
74-
* When the property is nullable, this rule will wrap the rule on the property into [NullOr](NullOr.md) rule.
75-
* This rule has no templates because it uses the templates of the rules that are applied to the properties.
73+
- If the object has no attributes, the validation will always pass.
74+
- When the property is nullable, this rule will wrap the rule on the property into [NullOr](NullOr.md) rule.
75+
- This rule has no templates because it uses the templates of the rules that are applied to the properties.
7676

7777
## Categorization
7878

@@ -82,10 +82,11 @@ v::attributes()->assert(new Person('', 'not a date', 'not an email', 'not a phon
8282
## Changelog
8383

8484
| Version | Description |
85-
|--------:|-------------|
85+
| ------: | ----------- |
8686
| 3.0.0 | Created |
8787

88-
***
88+
---
89+
8990
See also:
9091

9192
- [Named](Named.md)

docs/rules/Call.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ v::call(
4646
### `Call::TEMPLATE_STANDARD`
4747

4848
| Mode | Template |
49-
|------------|------------------------------------------------------------|
49+
| ---------- | ---------------------------------------------------------- |
5050
| `default` | {{input}} must be a suitable argument for {{callable}} |
5151
| `inverted` | {{input}} must not be a suitable argument for {{callable}} |
5252

5353
## Template placeholders
5454

5555
| Placeholder | Description |
56-
|-------------|------------------------------------------------------------------|
56+
| ----------- | ---------------------------------------------------------------- |
5757
| `callable` | |
5858
| `input` | |
59-
| `subject` | The validated input or the custom validator name (if specified). |
59+
| `subject` | The validated input or the custom validator name (if specified). |
6060

6161
## Categorization
6262

@@ -67,10 +67,11 @@ v::call(
6767
## Changelog
6868

6969
| Version | Description |
70-
|--------:|-------------|
70+
| ------: | ----------- |
7171
| 0.3.9 | Created |
7272

73-
***
73+
---
74+
7475
See also:
7576

7677
- [Callback](Callback.md)

0 commit comments

Comments
 (0)