You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panic(fmt.Sprintf("Bad field type %s", field.Type()))
2944
2945
}
2945
2946
2946
-
// isIsoBicFormat is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362
2947
-
funcisIsoBicFormat(flFieldLevel) bool {
2947
+
// isIsoBic2014Format is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362 2014
2948
+
funcisIsoBic2014Format(flFieldLevel) bool {
2948
2949
bicString:=fl.Field().String()
2949
2950
2950
-
returnbicRegex().MatchString(bicString)
2951
+
returnbic2014Regex().MatchString(bicString)
2952
+
}
2953
+
2954
+
// isIsoBic2022Format is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362 2022
2955
+
funcisIsoBic2022Format(flFieldLevel) bool {
2956
+
bicString:=fl.Field().String()
2957
+
2958
+
returnbic2022Regex().MatchString(bicString)
2951
2959
}
2952
2960
2953
2961
// isSemverFormat is the validation function for validating if the current field's value is a valid semver version, defined in Semantic Versioning 2.0.0
semverRegexString=`^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`// numbered capture groups https://semver.org/
cveRegexString=`^CVE-(1999|2\d{3})-(0[^0]\d{2}|0\d[^0]\d{1}|0\d{2}[^0]|[1-9]{1}\d{3,})$`// CVE Format Id https://cve.mitre.org/cve/identifiers/syntaxchange.html
0 commit comments