ASPX templates
Version 7.x > ASPX templates > Dependent field validation View modes: 
User avatar
Member
Member
esolutions - 7/21/2013 9:47:52 PM
   
Dependent field validation
Hi,
We're creating an online loan application that has a co-applicant section. When a value is entered into the first name/last name fields of the coapplicant then the validation for certain fields needs to fire onbut they aren't. For example there is valdiation applied to the Canadian postal code where it needs to be filled in and it needs to be in the A1A 1A1 format. However, when we enter in a value for the first name/last name fields of the co-applicant section, the validation does not get applied. Is there something we can add to the macro to apply the validation when something is entered into a dependent field?

User avatar
Kentico Support
Kentico Support
kentico_filipl - 7/21/2013 11:20:57 PM
   
RE:Dependent field validation
Hi,

Are you looking for asynchronous validation, i.e. checking field values and throwing validation warnings before submitting the form? If so, you will need to create your own form control with this action. You can take Password strength form control as an example - its source code files are in ~\CMSModules\Membership\FormControls\Passwords\PasswordStrength.ascx.cs and ~CMSScripts\membership.js.

Best regards,
Filip Ligac