Skip to content

Commit

Permalink
fix: IP validation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gfenn-newbury committed Feb 14, 2023
1 parent cde4c58 commit 12c1a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routeros/provider_schema_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ var (
"value should be an integer or a time interval: 0..4294967295 (seconds) or 500ms, 2d, 1w")
ValidationAutoYesNo = validation.StringInSlice([]string{"auto", "yes", "no"}, false)
ValidationIpAddress = validation.StringMatch(
regexp.MustCompile(`^$|^!?(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/([0-9]|[1-2][0-9]|3[0-2]))?)$`),
regexp.MustCompile(`^$|^!?(\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(/([0-9]|[0-9]|[1-2][0-9]|3[0-2]))?)$`),
"Allowed addresses should be a CIDR IP address or an empty string",
)
ValidationMacAddress = validation.StringMatch(
Expand Down

0 comments on commit 12c1a23

Please sign in to comment.