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
// 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
2426
+
funcisSemverFormat(flFieldLevel) bool {
2427
+
semverString:=fl.Field().String()
2428
+
2429
+
returnsemverRegex.MatchString(semverString)
2430
+
}
2431
+
2424
2432
// isDnsRFC1035LabelFormat is the validation function
2425
2433
// for validating if the current field's value is
2426
2434
// a valid dns RFC 1035 label, defined in RFC 1035.
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/
0 commit comments