[jifty-devel] Validating distinct fields
Sean E. Millichamp
sean at enertronllc.com
Mon Jun 5 09:56:03 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.
If you look in jifty/lib/Jifty/Action/Record.pm, line 179:
# build up a validator sub if the column implements validation
# and we're not overriding it at the action level
if ( $column->validator and not $self->can("validate_$field")) {
$info->{ajax_validates} = 1;
If you don't specify any validator then it autogenerates one and
automatically enables ajax_validates. The reason you aren't seeing it
is because you have manually created your own validation routine, when
you do that you have to manually enable ajax_validates.
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/20b8589d/attachment.pgp
More information about the jifty-devel
mailing list