Skip to content

Commit d688f63

Browse files
committed
Minor tweaks
1 parent d8e5122 commit d688f63

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: reference/constraints/Slug.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Slug
55

66
The ``Slug`` constraint was introduced in Symfony 7.3.
77

8-
Validates that a value is a slug.
9-
A slug is a string that, by default, matches the regex ``/^[a-z0-9]+(?:-[a-z0-9]+)*$/``.
8+
Validates that a value is a slug. By default, a slug is a string that matches
9+
the following regular expression: ``/^[a-z0-9]+(?:-[a-z0-9]+)*$/``.
1010

1111
.. include:: /reference/constraints/_empty-values-are-valid.rst.inc
1212

@@ -19,7 +19,7 @@ Validator :class:`Symfony\\Component\\Validator\\Constraints\\SlugValidator`
1919
Basic Usage
2020
-----------
2121

22-
The ``Slug`` constraint can be applied to a property or a "getter" method:
22+
The ``Slug`` constraint can be applied to a property or a getter method:
2323

2424
.. configuration-block::
2525

@@ -77,14 +77,14 @@ The ``Slug`` constraint can be applied to a property or a "getter" method:
7777
}
7878
}
7979
80-
Examples of valid values :
80+
Examples of valid values:
8181

8282
* foobar
8383
* foo-bar
8484
* foo123
8585
* foo-123bar
8686

87-
Upper case characters would result in an violation of this constraint.
87+
Uppercase characters would result in an violation of this constraint.
8888

8989
Options
9090
-------
@@ -94,8 +94,8 @@ Options
9494

9595
**type**: ``string`` default: ``/^[a-z0-9]+(?:-[a-z0-9]+)*$/``
9696

97-
This option allows you to modify the regular expression pattern that the input will be matched against
98-
via the :phpfunction:`preg_match` PHP function.
97+
This option allows you to modify the regular expression pattern that the input
98+
will be matched against via the :phpfunction:`preg_match` PHP function.
9999

100100
If you need to use it, you might also want to take a look at the :doc:`Regex constraint <Regex>`.
101101

0 commit comments

Comments
 (0)