@@ -10,7 +10,7 @@ Validates that a value is a valid URL string.
10
10
| | - `protocols `_ |
11
11
| | - `payload `_ |
12
12
| | - `checkDNS `_ |
13
- | | - `dnsMessage`_
13
+ | | - `dnsMessage `_ |
14
14
+----------------+---------------------------------------------------------------------+
15
15
| Class | :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Url ` |
16
16
+----------------+---------------------------------------------------------------------+
@@ -300,6 +300,9 @@ option to ``true``:
300
300
}
301
301
}
302
302
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
+
303
306
dnsMessage
304
307
~~~~~~~~~~
305
308
@@ -324,7 +327,7 @@ DNS check failed.
324
327
{
325
328
/**
326
329
* @Assert\Url(
327
- * dnsMessage = "The host '{{ value }}' could not be resolved"
330
+ * dnsMessage = "The host '{{ value }}' could not be resolved. "
328
331
* )
329
332
*/
330
333
protected $bioUrl;
@@ -336,7 +339,8 @@ DNS check failed.
336
339
AppBundle\Entity\Author :
337
340
properties :
338
341
bioUrl :
339
- - Url : { dnsMessage: The host "{{ value }}" could not be resolved }
342
+ - Url :
343
+ dnsMessage : ' The host "{{ value }}" could not be resolved.'
340
344
341
345
.. code-block :: xml
342
346
@@ -349,7 +353,7 @@ DNS check failed.
349
353
<class name =" AppBundle\Entity\Author" >
350
354
<property name =" bioUrl" >
351
355
<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 >
353
357
</constraint >
354
358
</property >
355
359
</class >
@@ -368,10 +372,7 @@ DNS check failed.
368
372
public static function loadValidatorMetadata(ClassMetadata $metadata)
369
373
{
370
374
$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. '
372
376
)));
373
377
}
374
378
}
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