applying validation to a field from managed code.... - InfoPath Dev
in

InfoPath Dev

applying validation to a field from managed code....

Last post 01-19-2009 06:27 AM by swathip. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-19-2009 02:45 AM

    • yugalb
    • Not Ranked
    • Joined on 01-19-2009
    • Posts 2

    applying validation to a field from managed code....

     Hi

    I have a Infopath form .i want to apply validation to field in main datasource.i want to do this using managed code..can anybody tell me how i can do this...actually i want do apply phone number validation to a field in maindatasource based on locale i.e if country is US then there should be a phone format and if country is japan, the phone format should be different.

    its urgent..

    Thanks

     

  • 01-19-2009 03:10 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: applying validation to a field from managed code....

    Hi,

    Can you verify below link.

    http://aspalliance.com/718

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-19-2009 06:27 AM In reply to

    Re: applying validation to a field from managed code....

    Hi,

    You can add the data validation to a field using the below code.

    this.Errors.Add(<node of the field to which you want to add validation>, "<name of the validation>", "<message>");

     

    You need to add this code by checking whether the pattern is correct or not using if condition.

    Swathip
    www.ggktech.com
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.