Skip to content

Commit 096110d

Browse files
ro0NLnicolas-grekas
authored andcommitted
[Validator] Clarify UUID validator behavior
1 parent 9c29356 commit 096110d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Constraints/UuidValidator.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@
1818
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1919

2020
/**
21-
* Validates whether the value is a valid UUID per RFC 4122.
21+
* Validates whether the value is a valid UUID (also known as GUID).
22+
*
23+
* Strict validation will allow a UUID as specified per RFC 4122.
24+
* Loose validation will allow any type of UUID.
25+
*
26+
* For better compatibility, both loose and strict, you should consider using a specialized UUID library like "ramsey/uuid" instead.
2227
*
2328
* @author Colin O'Dell <colinodell@gmail.com>
2429
* @author Bernhard Schussek <bschussek@gmail.com>
2530
*
2631
* @see http://tools.ietf.org/html/rfc4122
2732
* @see https://en.wikipedia.org/wiki/Universally_unique_identifier
33+
* @see https://github.com/ramsey/uuid
2834
*/
2935
class UuidValidator extends ConstraintValidator
3036
{

0 commit comments

Comments
 (0)