Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Mohammad Khan 23 posts 81 karma points
    Nov 26, 2014 @ 20:54
    Mohammad Khan

    Getting "Value is invalid, it does not match the correct pattern" on Non-Mandatory field

    I just recently updated Umbraco from 4.7.2 to 7.1.9 and am slowly fixing all the broken macro's etc.. Aside from that I am noticing an issue with some custom non-mandatory "TextString" fields with an associated RegEx pattern.

    For example I have an employee doctype that defines optional fields for phone and fax. There is validation RegEx defined for both. If the Fax field is left empty it throws the following error: "Value is invalid, it does not match the correct pattern". If I remove the RegEx from the DocType then it doesn't throw the error anymore.

    Also I notice there is a bunch of items in my Content Tree that appear duplicated with a "+" sign and if I republish the item again the duplicated item disappears. Not sure why that is occuring either.

    Any help will appreciated.

    Thank You.

  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Nov 26, 2014 @ 21:42
    Jan Skovgaard

    Hi Mohammad

    Could you describe the upgrade path you have taken?

    If you install a fresh copy of Umbraco 7.1.9 and you setup the same regex on a document type does the issue also happen there as well? If so it may be a bug in the 7.1.9 release. Otherwise it's probably due to how the upgrade has been performed.

    It would also be nice to know if you have made some custom use of the Umbraco API in the backoffice and what 3rd party packages that are installed and of course the database you're running.

    Cheers, Jan

  • Mohammad Khan 23 posts 81 karma points
    Nov 26, 2014 @ 22:02
    Mohammad Khan


    I did an incremental update as suggested in the umbraco docs and a guide I found online. My site loads to a certain extent but I have several different backend issues (macros mainly) that I am working to fix. I also had ucomponents installed but I am not sure if it was being really used or not.

    I have not tried testing the regex itself on a fresh install of 7.1.9, I can try it out though worse come to worse. Even then I don't think the regex itself would be an issue if the field is not mandatory.

    Don't think we have custom Umbrao API usage going on either. As far as 3rd party packages (haven't updated these yet) we have:

    • Examine Dashboard 0.2
    • FamFamFam Icon Package 1
    • ImageGen 2.5.2
    • MultipleFileUpload 1.2
    • PathFixup 1.0.2
    • 0.5
    • uComponents 6.0.0
    • Umbraco Contour 1.1.10 (Updated)
    • Umbraco Courier 2.7 (Updated)
    • XSLT Search 3.03
    I have removed the uComponenet dlls btw. Didn't try uninstalling it from package manager. Didn't know uComponents was not compatible/useful in v7 before I started the upgrade process.
    I am mostly updating the macros using Visual Studio using the old method of doing a batch copy of the updated files before "Umbraco" was added to nuget. I have thought about importing the latest version using Nuget but I am afraid it will break. As I understand there is no need to do any batch copying anymore as we have other internal Umbraco sites running on version 6.0 straight from the Visual Studio solution via IIS but this is an older site with a ton of content.
    Thank you for your help.
  • Mohammad Khan 23 posts 81 karma points
    Dec 15, 2014 @ 18:48
    Mohammad Khan

    Just wanted to post an update that I have upgraded all the plugins to the latest version that are compatible with Umbraco 7. Still haven't resolved this issue though. Any help will be appreciated.

  • Mohammad Khan 23 posts 81 karma points
    Dec 30, 2014 @ 16:17
    Mohammad Khan

    I am still suffering from this issue. I also tried to test another doctype by adding regex for  non mandatory field it gives me a validation error after post back even though its NOT marked mandatory. Haven't tried it yet with a fresh copy of Umbraco 7. Going to try that now.

  • Mohammad Khan 23 posts 81 karma points
    Dec 30, 2014 @ 17:27
    Mohammad Khan

    I just setup a new Umbraco solution using Visual Studio and after the initial setup I went in added a new optional textstring property to the TextPage doctype and now I am getting the same validation error (Value is invalid, it does not match the correct pattern) so I guess I can say that nothing is corrupted on my end. Maybe this is a bug in Umbraco 7.2 ?

  • Garrett Fisher 341 posts 496 karma points
    Sep 09, 2015 @ 17:16
    Garrett Fisher

    Somewhere between 4x and 6x non-null values crept into the validation fields. You could have that problem. I did. Go into every field on the offending document type and select everything inside the validation field and delete it.

Please Sign in or register to post replies

Write your reply to: