[Dbix-class] Proposed DBIx::Class::Validate Changes

Matt S Trout dbix-class at trout.me.uk
Sun May 14 14:04:40 CEST 2006

Aran Deltac wrote:
> On 5/12/06, Christopher H. Laco <claco at chrislaco.com> wrote:
>> /claco arises from the land of the dead
>> Now that I've ditched a majority of my distractions (a zillion email
>> lists and rss feeds, irc, icq, im, etc), I've finally got a good
>> foothold on the Handel redesign using DBIC schemas.
>> So far so good; great in fact. One of the changes I'm making is to move
>> towards using Validate as a replacement for the old CDBI constraints. A
>> couple of hacks later; making my Exception/Constraint::check pretend to
>> be FormValidator::Simple, everything is pretty much working. The only
>> feature I can't replicate is the fact that CDBI constraints could
>> actually change the column values if they needed to.
> Initially this seems better suited for inflation/deflation.  Do you
> have examples of how this would be useful?
> One example that comes to mind for me is some people like to store
> phone numbers with only the digits - none of the formatting
> characters.  But, this is a case where I'd almost rather have a
> deflator that could deflate to just digits no matter the format, and
> inflate to a nicely formatted number.

That runs back towards the plan for FilterColumn I guess; I think it was 
you who wrote up the TODO entry, do you have any further thoughts on that?

> That would be great if you can talk me in to it.  :)  Also, Matt wants
> me to move Validate to a separate distro.  I'll be doing that this
> week.

Right, mostly because if we're going to look at supporting more than one 
validator etc. we'll want to be providing them as extra classes and it's 
going to start getting a bit cluttered. UUIDColumns is scheduled to move 
external as well (I think tkp's been looking at that) for the same reason.

More information about the Dbix-class mailing list