Copied to clipboard

Flag this post as spam?

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

  • Mike Chambers 635 posts 1252 karma points c-trib
    Jan 09, 2018 @ 14:06
    Mike Chambers

    DotNetDataSource Addtional Options - make mandatory?

    I have used the additional options via during data-type configuration.

    [DotNetDataSource(Title="Example Property", Description="example description")]
      public string ExampleProperty { get; set; }

    I notice that in the flickr extension you set

    [DotNetDataSource(Title = "Flickr API Key", Description = "(required)")]
            public string ApiKey { get; set; }

    With the description as "required" suggesting that we can't force the parameter to mandatory.

    I've tried decorating parameters with [Required] also doesn't force mandatory

    Perhaps there isn't a mechanism for making datatype params mandatory???

    Am I missing a trick?

    I did see the [ValidationProperty("isValid")] decorator mentioned for classes, but that's not quite what is required, and unsure if this would work in this instance?

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Jun 28, 2018 @ 23:37
    Hendy Racher

    Hi Mike, no, unfortunately there's nothing to force a custom config property to be mandatory - it'd be good to have tho, so have raised an issue.

Please Sign in or register to post replies

Write your reply to: