[Gllug] OT: Police Web Site
Alain Williams
addw at phcomp.co.uk
Thu Feb 3 14:28:47 UTC 2011
On Thu, Feb 03, 2011 at 08:56:33AM +0000, Jason Clifford wrote:
> On Thu, 2011-02-03 at 08:37 +0000, Nix wrote:
> > It accepts quite a lot of invalid postcodes, but it's better than
> > nothing...
>
> Whether that is true or not depends upon your reason for trying to
> validate the postcode.
>
> If you are specifically trying to avoid allowing people to enter invalid
> data values then it's arguably worse than nothing as having it may give
> a false sense that the application using it is correct.
>
> Really using a regular expression to validate data which can be
> syntactically correct but wrong isn't the right approach. Whether it's
> worth paying for the full list of real valid postcodes for the purposes
> of validating input is another question of course.
Quite ... but with things like this I do an RE check first then a (more expensive)
check against a list of real post codes, or whatever.
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list