public override bool IsValid()

in Webapp/SDAF/Models/CustomValidators.cs [142:163]


            public override bool IsValid(object value)
            {
                if (value == null) return true;
                string pattern = @"^\/subscriptions\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/resourceGroups\/[a-zA-Z0-9-_]+\/providers\/Microsoft.Network\/privateEndpoints\/[a-zA-Z0-9-_]+$";
                if (value.GetType().IsArray)
                {
                    string[] values = (string[])value;
                    foreach (string v in values)
                    {
                        if (!RegexValidation(v, pattern)) return false;
                    }
                    return true;
                }
                else if (value.GetType() == typeof(string))
                {
                    return RegexValidation(value, pattern);
                }
                else
                {
                    return false;
                }
            }