returnruleBuilder.SetValidator(newRegularExpressionValidator("^http(s)?://",RegexOptions.IgnoreCase)).WithMessage("must start with http:// or https://");
returnruleBuilder.SetValidator(newRegularExpressionValidator("^http(s)?://",RegexOptions.IgnoreCase)).WithMessage("must start with http:// or https://");
throwExceptionFactory.CreateForParamValidation(param.Name,string.Format("value [{0}] is not a valid *nix path. paths must start with /",param.Value));
{
throwExceptionFactory.CreateForParamValidation(param.Name,string.Format("value [{0}] is not a valid *nix path. paths must start with /",param.Value));
}
}
else
{
if(windowsInvalidPathRegex.IsMatch(param.Value))
{
throwExceptionFactory.CreateForParamValidation(param.Name,string.Format("value [{0}] is not a valid Windows path. It contains invalid characters",param.Value));
throwExceptionFactory.CreateForParamValidation(param.Name,string.Format("value [{0}] is not a valid Windows path. paths must be a full path eg. C:\\Windows",param.Value));
}
}
}
throwExceptionFactory.CreateForParamValidation(param.Name,string.Format("value [{0}] is not a valid Windows path. paths must be a full path eg. C:\\Windows",param.Value));
returnruleBuilder.SetValidator(newRegularExpressionValidator("^http(?:s)?://[a-z0-9-.]+",RegexOptions.IgnoreCase)).WithMessage("must be valid URL that");
returnruleBuilder.SetValidator(newRegularExpressionValidator("^http(?:s)?://[a-z0-9-.]+",RegexOptions.IgnoreCase)).WithMessage("must be valid URL that");