asked    Jacqueline     2018-10-12       regex       28 view        1 Answer

[SOLVED] Umbraco 7 regex error: Value is invalid, it does not match the correct pattern

I am seeing this error:

Value is invalid, it does not match the correct pattern

When I set a regex pattern in the doctype "Generic Properties" on something that is optional.

For example I setup a new UmbracoCMS 7.2.1 using Nuget with Visual Studio 2013 and after all the auto configuration/setup I went to the settings and added a regex to a new "optional" property called "title". Now when I go into "Content" and try to publish a page with the "TextPage" doctype (leaving the "Title" field blank) it returns the above error after postback for the "Title" field, even though the "Mandatory" checkbox is unchecked. Is there a work around for this ?

I first encountered this error in an existing Umbraco site that I just upgraded from v4 to v7.2 and I thought something had corrupted the templates but it doesn't seem to be the case.

Any help will be appreciated.

  1 Answer  

        answered    Edgar     2018-10-12      

By providing a regular expression for the field you in turn make it mandatory. If you wish for the field to be optional then you must either omit your regular expression or alter it so that it also accepts an empty value.





Your Answer





 2018-10-12         Joy

Disabled Umbraco users still appearing in backend

I appreciate that you cannot delete users from Umbraco in the true sense of the word due to referential integrity within the SQL database should there be any nodes associated with themI have a database that has had several dev/test users created over time and I need to deliver the database to a client.If I disable a user (selecting both "Disable user" and "Disable Umbraco Access"), how can I stop them appearing in the list of users in the backend? I do not mind them remaining dormant in the database but do not want the client (who will be logging on as an Admin) see them ...
 content-management-system                     1 answers                     8 view
 2018-10-12         Norton

Umbraco: Document Type Chain by Composition

Can I use Composition in Umbraco 7.5 to make a property inheritance chain, like BaseType > ContentPage > HomePage, in which ContentPage has its own properties and inherit all properties from BaseType, and HomePage has its own properties and inherit all properties form ContentPage explicitly, and of course from BaseType implicitly? For some reason, I can make ContentPage to have a composition of type BaseType, but then for HomePage, Umbraco doesn't display ContentPage as an option. I thought the new Composition feature has replaced document type hierarchies (defining documen...
 c#                     1 answers                     9 view
 2018-10-12         Kristin

Umbraco Carousel Content

I am putting together my first Umbraco project and starting to pick it up nicely. I am a little stuck at creating an appropriate repeatable field for a Carousel with text, image and a link but also how to output that in a template.I come from a Craft CMS / Expression Engine background and would usually use a repeatable field like Matrix or Grid for such a task.Any help would be fantastic!Thanks!-Graham Check Nested Content package (it will be included in Umbraco Core soon): https://our.umbraco.org/projects/backoffice-extensions/nested-content/ and then create appropriate...
 content-management-system                     1 answers                     10 view