InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

Last post 06-22-2018 10:52 AM by Wheels. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-18-2018 08:08 AM

    InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

    Good morning.

    I set up a Regular Expression on a Date Picker control by going to the Date Picker Properties --> Advanced (tab) --> Input Scope --> Custom --> New --> Input Scope --> Name: Validation, Type: Regular Expression, Regular Expression: ^(0?[1-9]|1[012])/([1]|0[1])/((19|20)[0-9][0-9])$ --> OK --> Checked Recognized non-matching input --OK.

    I am looking to only allow the user to enter dates that are the 1st of each month, and all others would highlight red as incorrect.

    It states that incorrect RegEx will be ignored, but I verified it from the following site: http://regex-testdrive.com/en/dotest

    Thank you, WHEELS. 

  • 06-18-2018 08:48 AM In reply to

    Update: InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

    I also tried to set up a Validation rule. Under the Condition I select the field, does not match pattern, Custom Pattern: ^(0?[1-9]|1[012])/([1]|0[1])/((19|20)[0-9][0-9])$, and it lists it as Custom Pattern: 01/1/1900$. When I preview the form, no date is valid.

    WHEELS 

  • 06-18-2018 10:21 AM In reply to

    Re: Update: InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

    XML stores dates as yyyy-MM-dd, so your regex will need to take that into account. Is this on a date field?
    Hilary Stoupa

  • 06-18-2018 10:47 AM In reply to

    Re: Update: InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

     Hi Hilary. This is on a date field, and sometimes I forget about the XML date format. I'll alter the RegEx, and see what happens. Thank you. WHEELS

  • 06-18-2018 11:44 AM In reply to

    Re: Update: InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

     I got it working. I used the following: ^((19|20)[0-9][0-9])-(0?[1-9]|1[012])-([1]|0[1]) Although the '$' at the end works online, in InfoPath it was throwing it off initially.Thanks again Hilary. WHEELS

  • 06-18-2018 11:52 AM In reply to

    Re: Update: InfoPath 2013 Win 7 Issue with Date Picket Regular Expression Validation

    Great job getting it working & thanks for updating with what works to help others!
    Hilary Stoupa

  • 06-22-2018 10:52 AM In reply to

    Re: Update: InfoPath 2013 Win 7 Issue with Date Picker Regular Expression Validation

    Hilary Stoupa:
    Great job getting it working & thanks for updating with what works to help others!
     

    My pleasure. Sharing is caring. WHEELS 

Page 1 of 1 (7 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.