Third parameter for FORM::URL validation rule for tld
Notice: This thread is very old.
- Grelek
- Member | 233
Hello,
I think it could be useful feature. Normally FORM::URL
marks
URLs without tld as valid. I want to add third parameter (TRUE
)
that describes if we want “tld mode”, if not, leave third
parameter blank.
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)
- Majkl578
- 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
Normally
FORM::URL
marks URLs without tld as valid.
Not true, in case of www.bbc
is bbc
the TLD.