Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Adding regular expression validator to a Razor Function property?

$
0
0
Not my area of expertise but I have only seen it used in this context:
        #region Data field attributes
        [ImmutableFieldId("c68429ed-74c3-4ad6-afee-b6364f80f224")]
        [StoreFieldType(PhysicalStoreFieldType.String, 64)]
        [LazyFunctionProviedProperty("<f:function xmlns:f=\"http://www.composite.net/ns/function/1.0\" name=\"Composite.Ut" +
            "ils.Validation.RegularExpressionValidation\">\r\n  <f:param name=\"pattern\" value=\"{put in your validation regex here}" +
            "\" />\r\n</f:function>")]
        [NotNullValidator()]
        [FieldPosition(0)]
        [StringSizeValidator(0, 64)]
        [DefaultFieldStringValue("")]
        #endregion
        string Title { get; set; }
I assume thats the intention of the RegularExpressionValidation function you found, and it properly takes some work to get what you trying to work.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>