validators.rst 886 B

12345678910111213141516171819202122232425262728293031323334
  1. .. _reference.validators:
  2. ==========
  3. Validators
  4. ==========
  5. .. php:namespace:: Ramsey\Uuid\Validator
  6. .. php:interface:: ValidatorInterface
  7. .. php:method:: getPattern()
  8. :returns: The regular expression pattern used by this validator
  9. :returntype: ``string``
  10. .. php:method:: validate($uuid)
  11. :param string $uuid: The string to validate as a UUID
  12. :returns: True if the provided string represents a UUID, false otherwise
  13. :returntype: ``bool``
  14. .. php:class:: GenericValidator
  15. Implements :php:interface:`Ramsey\\Uuid\\Validator\\ValidatorInterface`.
  16. GenericValidator validates strings as UUIDs of any variant.
  17. .. php:namespace:: Ramsey\Uuid\Rfc4122
  18. .. php:class:: Validator
  19. Implements :php:interface:`Ramsey\\Uuid\\Validator\\ValidatorInterface`.
  20. Rfc4122\Validator validates strings as UUIDs of the RFC 4122 variant.