I was able to reproduce the issue, I'm not sure if the behaviour is by
design or a bug.
When the action is executed normally, with layout, the jQuery rules
are generated.
When the layout is cancelled, for an ajax action, the rules are not
generated.
rules are generated:
[AjaxAction]
public void NewRegion ()
{
PropertyBag["region"] = new Region();
}
rules are not generated:
[AjaxAction]
public void New()
{
PropertyBag["region"] = new Region();
CancelLayout();
RenderSharedView( "/regions/edit_region");
}
On Jan 26, 11:33 am, bdaniel7 <[email protected]> wrote:
> Hello,
>
> A while ago (pre 2.0) the validation attributes placed on a model were
> expressed as jQuery validation rules at runtime.
> Example from an older project:
>
> jQuery( document ).ready( function()
> { jQuery("#register").validate( {messages:
> {"user.DeliveryAddress.City":{ required: "This is a required
> field." } }} );
>
> But in a 2.0 version, those attributes are no longer generated as
> jQuery validation rules.
> Example from current project:
>
> jQuery( document ).ready( function()
> { jQuery("#region").validate( {} );
>
> Is this a bug?
> Where should I look to see what changed?
> Has anyone encountered this problem as well?
>
> Thanks,
> Daniel
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.