Copied to clipboard

Flag this post as spam?

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


  • Paul Fowles 75 posts 184 karma points
    Mar 04, 2013 @ 16:01
    Paul Fowles
    0

    Adding a default regex in a custom field?

    Hi,

    From looking at http://www.nibble.be/?p=154 I've been able to create a number of field types.

    I was wondering is it possible to set the regex fields programatically and if so how?

    I've tried using the setter in bool SupportRegex but I know I'm not doing it right.

     

      public override bool SupportsRegex
            {
                get
                {
                    return true;
                }

           set{   Values = Regex r

    }          
            }

    Thanks

    Paul

  • Comment author was deleted

    Mar 04, 2013 @ 16:02

    Nope you can't set that up in the custom fieldtype 

  • Comment author was deleted

    Mar 04, 2013 @ 16:06

    Added it as a feature request: http://issues.umbraco.org/issue/CON-297

  • Paul Fowles 75 posts 184 karma points
    Mar 04, 2013 @ 16:10
    Paul Fowles
    0

    So there is no way to access the regex field progamatically you can just show or hide it from a user

  • Comment author was deleted

    Mar 04, 2013 @ 16:14

    Yup fieldtype only controls if it supports regex (so if that option is available) 

  • Paul Fowles 75 posts 184 karma points
    Mar 04, 2013 @ 16:20
    Paul Fowles
    0

    So if supports regex is set to true I cannot put a regular expression into the additional setting via code and have to do it via contour

     

Please Sign in or register to post replies

Write your reply to:

Draft