"getValue()" breaking javascript validation

21 views
Skip to first unread message

Steven Klotz

unread,
May 29, 2013, 9:35:44 PM5/29/13
to valida...@googlegroups.com
I have rules setup for validating an address which in general work fine.
When I added the rules for "state" and "province" javascript validation started failing because "getValue()" was undefined.

<property name="country" desc="Country">
<rule type="required" contexts="*" />
</property>
<property name="state" desc="State">
<rule type="required">
<param name="DependentPropertyName" value="country"/>
<param name="DependentPropertyValue" value="US"/>
</rule>
</property>
<property name="province" desc="Province">
<rule type="required">
<param name="DependentPropertyName" value="country"/>
<param name="DependentPropertyValue" value="CA"/>
</rule>
</property>

I fixed this by replacing getValue() with val() :

replace(rc.address.getValidationScript(context="Shipping"),"getValue()","val()","ALL");

This seems rather odd. Am I missing something?

Matt Quackenbush

unread,
May 29, 2013, 10:25:46 PM5/29/13
to valida...@googlegroups.com

VT uses the fields plugin which provides that method. Sounds like you don't have all of the assets loaded.

Sent from a mobile something

--
You received this message because you are subscribed to the Google Groups "ValidateThis" group.
To unsubscribe from this group and stop receiving emails from it, send an email to validatethis...@googlegroups.com.
To post to this group, send email to valida...@googlegroups.com.
Visit this group at http://groups.google.com/group/validatethis?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages