[jifty-devel] Validating distinct fields

Sean E. Millichamp sean at enertronllc.com
Mon Jun 5 11:58:21 EDT 2006


On Mon, 2006-06-05 at 07:25 -0400, Edward Funnekotter wrote:
> Sounds reasonable.  I was unaware that the validation function would
> be called via AJAX automatically.  It doesn't seem to for me (firefox
> 1.5.0.4/jifty-head) unless I specifically set 'ajax_validates' during
> argument validation in my Action file, but I may have some
> configuration problem preventing this.  

I just committed support for 'distinct' checking in Jifty::DBI::Record
for both creates and updates with a new test script that now passes
constraint checking for columns marked with 'is distinct'.

If you check Jifty::DBI out from SVN you need at least r1159.

If someone wants AJAX verification of distinct checking then they will
still have to do something like what you were doing, but it should catch
it when you do create()s and set_columns()s on your Jifty::Model::name
(ie: at submit time).

Feedback welcome on the error messages and errnos I choose for return.

Sean

-- 
 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20060605/1fbf2db3/attachment.pgp


More information about the jifty-devel mailing list