diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst
index 42ea1f1da2c..bacec609d33 100644
--- a/reference/constraints/Url.rst
+++ b/reference/constraints/Url.rst
@@ -8,6 +8,7 @@ Validates that a value is a valid URL string.
+----------------+---------------------------------------------------------------------+
| Options | - `message`_ |
| | - `protocols`_ |
+| | _ `checkDNS`_ |
+----------------+---------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Url` |
+----------------+---------------------------------------------------------------------+
@@ -26,6 +27,9 @@ Basic Usage
properties:
bioUrl:
- Url: ~
+ message: The url "{{ value }}" is not a valid url.
+ protocols: [http, https]
+ checkDNS: true
.. code-block:: php-annotations
@@ -37,7 +41,11 @@ Basic Usage
class Author
{
/**
- * @Assert\Url()
+ * @Assert\Url(
+ * message = "The url '{{ value }}' is not a valid url",
+ * protocols = {"http", "https"}
+ * checkDNS = true
+ * )
*/
protected $bioUrl;
}
@@ -52,7 +60,14 @@ Basic Usage
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: