[jifty-devel] Validating distinct fields

Ruslan Zakirov ruslan.zakirov at gmail.com
Mon Jun 5 13:03:42 EDT 2006


I only want suggest to replace "is distinct" with "is unique" as the
latter is more descriptive to people who don't know SQL.

On 6/5/06, Sean E. Millichamp <sean at enertronllc.com> wrote:
> 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
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQBEhFSdlsIYP8YyMyQRAidnAJsEJG2uvisTYd1ZaNxirO1T+0uWNgCghZ9m
> AP19gdK8SwS+RDTCXzcZcfA=
> =kmiB
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>
>
>


-- 
Best regards, Ruslan.


More information about the jifty-devel mailing list