Indicates whether the argument is a syntactically valid domain name using lenient validation. Specifically, validation against RFC 3490 ("Internationalizing Domain Names in Applications") is skipped. The following two code snippets are equivalent
(String name)
| 467 | |
| 468 | |
| 469 | public static boolean isValid(String name) { |
| 470 | try { |
| 471 | from(name); |
| 472 | return true; |
| 473 | } catch (IllegalArgumentException e) { |
| 474 | return false; |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * Does the domain name match one of the "wildcard" patterns (e.g. {@code "*.ar"})? |