mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-11 05:06:39 +00:00
fix bug preventing save resource priority closes #2063
This commit is contained in:
@@ -449,15 +449,16 @@ export default function ResourceRules(props: {
|
|||||||
type="number"
|
type="number"
|
||||||
onClick={(e) => e.currentTarget.focus()}
|
onClick={(e) => e.currentTarget.focus()}
|
||||||
onBlur={(e) => {
|
onBlur={(e) => {
|
||||||
const parsed = z
|
const parsed = z.coerce
|
||||||
|
.number()
|
||||||
.int()
|
.int()
|
||||||
.optional()
|
.optional()
|
||||||
.safeParse(e.target.value);
|
.safeParse(e.target.value);
|
||||||
|
|
||||||
if (!parsed.data) {
|
if (!parsed.success) {
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: t("rulesErrorInvalidIpAddress"), // correct priority or IP?
|
title: t("rulesErrorInvalidPriority"), // correct priority or IP?
|
||||||
description: t(
|
description: t(
|
||||||
"rulesErrorInvalidPriorityDescription"
|
"rulesErrorInvalidPriorityDescription"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user