diff --git a/arn/validate/Validate.go b/arn/validate/Validate.go index 5d38d745..ffc633c4 100644 --- a/arn/validate/Validate.go +++ b/arn/validate/Validate.go @@ -60,7 +60,7 @@ func Date(date string) bool { // YearMonth tells you whether the date contain only the year and the month. func YearMonth(date string) bool { - if date == "" || strings.HasPrefix(date, "0001") { + if len(date) != len(YearMonthFormat) || strings.HasPrefix(date, "0001") { return false }