1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Verifing data in custom control after edit mode submit

Verifing data in custom control after edit mode submit

2 posts, 0 answered
  1. Drew
    Drew avatar
    16 posts
    Registered:
    19 Sep 2008
    19 Sep 2008
    Link to this post
    Hello,

    I have developed a custom control with an "email" public property, which get's turned into a text box by Sitefinity when in edit mode.  When the user submits changes in edit mode, I would like to verify that the e-mail address is in a correct format.  If the e-mail address is not correct, I would like to display a warning and stop the submit post back from committing.  This would leave the edit mode open until a valid e-mail is entered.  Better yet, is it possible to add a regex validater control and attach it to the textboxt that's created automatically by Sitefinity? 

    Any info would be greatly appreciated.

    Thanks.
    - Drew
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    24 Sep 2008
    Link to this post
    Hi Drew,

    I would recommend you implement a type editor for this property and put the validator in it. Please, refer to the following blog post that discusses how to create a complex property editor (the window that opens when the user clicks "Select" button and lets him visually determine the value of the property).

    Do let us know if you need any further assistance.

    All the best,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered