Copied to clipboard

Flag this post as spam?

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


  • Daniel Chenery 119 posts 465 karma points
    Sep 06, 2017 @ 12:46
    Daniel Chenery
    0

    Hi All,

    I've created a custom DataType for use in a macro using the colour picker. My manifest looks like the following:

    {
    propertyEditors:[
        {
            name: "Defined Colour Picker",
            alias: "Custom.DefinedColorPicker",
            icon: "icon-wand",
            group: "Pickers",
            isParameterEditor: true,
            editor:{
                view: "ColorPicker"
            },
    
            defaultConfig: {
                items: ["#000000", "#FFFFFF"]
            },
    
            validation: {
                mandatory: false
            }
        }
    ],
    

    }

    However, I'm getting the following error:

    Cannot read property 'mandatory' of undefined at e.ColorPickerController.$scope.validateMandatory [as valPropertyValidator]
    

    I can see the troublesome line of code is the (in umbraco.controllers.js)

    isValid: !$scope.model.validation.mandatory || ($scope.model.value != null && $scope.model.value != "")
    

    As you can see, I added the mandatory field to my manifest but it hasn't solved it :(

Please Sign in or register to post replies

Write your reply to:

Draft