Copied to clipboard

Flag this post as spam?

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


  • Steve 10 posts 30 karma points
    Jun 29, 2012 @ 11:34
    Steve
    0

    Creating an Umbraco Data Type

    I want to create a usercontrol that will store doubles.

    I have got the basics down so far, i.e. implementing IDataType, inheriting BaseDataType, creating a control that implements IDataEditor and a "DataDouble" that inherits from DefaultData..

     

    So now I want to ensure the page isnt published if the value is invalid.

    I have tried putting a ValidationProperty on my IDataEditor implementation, but its never called.

    I also tried it on my IDataType implementaion.. still nothing.

     

    I really dont want to have to specify the validation regex on each use of the control.

    Since the control is specific to doubles, id like to maybe specify the regex in the code, perhaps as an override or hardcoding a property to set the value. 

    Has anyone tried this??

     

  • Steve 10 posts 30 karma points
    Jun 29, 2012 @ 12:12
    Steve
    0

    Okay.. seems ValidationProperty works when put on the IDataEditor implementation.

    BUT.. only when the field is mandatory. which is wierd..

    Can I make the editor mandatory from code??

Please Sign in or register to post replies

Write your reply to:

Draft