Third parameter for FORM::URL validation rule for tld
Notice: This thread is very old.
I think it could be useful feature. Normally
URLs without tld as valid. I want to add third parameter (
that describes if we want “tld mode”, if not, leave third
addRule(FORM::URL, "Non-valid URL!"); // accepts www.bbc addRule(FORM::URL, "Non-valid URL!", TRUE); // accepts only www.bbc.tld // and the same with emails
BTW – sorry for my errors in english
Last edited by Grelek (2013-05-12 19:14)
- Moderator | 1364
array of TLDs
The problem is, there is no such array of TLDs, because TLDs are expanding, everyone can buy his own gTLD. See ICANN: http://newgtlds.icann.org/en/. So it can't be safely matched against some list, because this list is being extended every day.
- Jan Tvrdík
- Nette guru | 2595
FORM::URLmarks URLs without tld as valid.
Not true, in case of
bbc the TLD.