Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-04-11 23:21:15


On Apr 11, 2005 7:13 PM, Darren Cook <darren_at_[hidden]> wrote:
> > but I DO have some C++ code to check both ISBN and Credit cards,
> > and most other protocols of this type.
> >
> > In fact I wonder if there is any interest in these as a Boost library?
>
> Yes (perhaps you could list all the protocols).
>
> I'd expect they'd be quicker than using regexes, self-documenting (E.g.
> "boost::validate::credit_card(cc)" is more readable than
> "^\d{4}-?\d{4}-?\d{4}-?\d{2,4}$"), and also more accurate (I believe
> credit cards have meaning to the numbers that can also be validated).

A boost::validate::date (and time and date_time) would be nice to have
too. Also perhaps ::email and ::url (these would only test for
syntactic validity, not resolving).

It might make sense to provide a collection of "user-input" validation
routines in one place like this.

-- 
Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk