'How to give Custom Validation Messages in Package.json "configuration" property in vscode extension

I am trying to add additional configuration properties in "Settings Wizard" of my Vscode Extension. I added below code snippet in package.json to get those configuration properties in settings UI

"configuration": [
            {
                "title": "Sample Configuration",
                "properties": {
                    "ProjectName": {
                        "type": "string",
                        "default": "",
                        "description": "Enter any customized name",
                        "order": 0
                    },
                    "ProjectDescriptionFile": {
                        "type": "string",
                        "default": "",
                        "description": "A relative path starts with backward or forward slash",
                        "pattern": "^(\\\\|/)+[a-zA-z0-9\\s_@\\-^!#$%&+={}[\\]/]+\\.dsc",
                        "order": 1
                    },
                    "ProjectInformationFile": {
                        "type": "string",
                        "default": "",
                        "description": "A relative path starts with backward or forward slash",
                        "pattern": "^(\\\\|/)+[a-zA-z0-9\\s_@\\-^!#$%&+={}[\\]/]+\\.(ini|cfg)",
                        "order": 2
                    }
                }
            }
        ]

**Issue**

I am not able to add custom validation messages in settings UI by any property found. Vscode is simply showing the regex as validation message is not useful to users

Settings UI in Sample Extension

Github Repository Link

https://github.com/vijitha311/Sample_Vscode_Extension

Do any property like "message" or something available to make custom validation messages in Configuration?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source