Welcome Guest, Not a member yet? Register   Sign In
valid_url rule not working
#7

(05-20-2015, 11:41 PM)rejoan Wrote: In fact i need a rules which will return true only when find URL like these "google.com", "www.google.com", "http://google.com" etc but return false when not a valid a web address

Your best bet in this case would probably be to create a custom validation function which calls the valid_url() method, then performs additional checks if the valid_url() method returns true.

The first resource for determining what makes up a valid URL is often RFC 3986, but I don't think you'll find this very helpful for whatever you need to do to determine what input represents a "valid web address".
Reply


Messages In This Thread
valid_url rule not working - by rejoan - 05-19-2015, 03:09 AM
RE: valid_url rule not working - by Avenirer - 05-19-2015, 03:30 AM
RE: valid_url rule not working - by rejoan - 05-19-2015, 03:33 AM
RE: valid_url rule not working - by mwhitney - 05-20-2015, 08:27 AM
RE: valid_url rule not working - by Avenirer - 05-19-2015, 03:41 AM
RE: valid_url rule not working - by rejoan - 05-20-2015, 11:41 PM
RE: valid_url rule not working - by mwhitney - 05-21-2015, 10:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB