@@ -10,7 +10,7 @@ Validates that a value is a valid URL string.
1010| | - `protocols `_ |
1111| | - `payload `_ |
1212| | - `checkDNS `_ |
13- | | - `dnsMessage`_
13+ | | - `dnsMessage `_ |
1414+----------------+---------------------------------------------------------------------+
1515| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Url ` |
1616+----------------+---------------------------------------------------------------------+
@@ -300,6 +300,9 @@ option to ``true``:
300300 }
301301 }
302302
303+ This option uses the :phpfunction: `checkdnsrr ` PHP function to check the validity
304+ of the ``ANY `` DNS record corresponding to the host associated with the given URL.
305+
303306dnsMessage
304307~~~~~~~~~~
305308
@@ -324,7 +327,7 @@ DNS check failed.
324327 {
325328 /**
326329 * @Assert\Url(
327- * dnsMessage = "The host '{{ value }}' could not be resolved"
330+ * dnsMessage = "The host '{{ value }}' could not be resolved. "
328331 * )
329332 */
330333 protected $bioUrl;
@@ -336,7 +339,8 @@ DNS check failed.
336339 AppBundle\Entity\Author :
337340 properties :
338341 bioUrl :
339- - Url : { dnsMessage: The host "{{ value }}" could not be resolved }
342+ - Url :
343+ dnsMessage : ' The host "{{ value }}" could not be resolved.'
340344
341345 .. code-block :: xml
342346
@@ -349,7 +353,7 @@ DNS check failed.
349353 <class name =" AppBundle\Entity\Author" >
350354 <property name =" bioUrl" >
351355 <constraint name =" Url" >
352- <option name =" dnsMessage" >The host "{{ value }}" could not be resolved</option >
356+ <option name =" dnsMessage" >The host "{{ value }}" could not be resolved. </option >
353357 </constraint >
354358 </property >
355359 </class >
@@ -368,10 +372,7 @@ DNS check failed.
368372 public static function loadValidatorMetadata(ClassMetadata $metadata)
369373 {
370374 $metadata->addPropertyConstraint('bioUrl', new Assert\Url(array(
371- 'dnsMessage' => 'The host "{{ value }}" could not be resolved'
375+ 'dnsMessage' => 'The host "{{ value }}" could not be resolved. '
372376 )));
373377 }
374378 }
375-
376- This option uses the :phpfunction: `checkdnsrr ` PHP function to check the validity
377- of the ``ANY `` DNS record corresponding to the host associated with the given URL.
0 commit comments