Skip to content

Commit 3c885dd

Browse files
authored
fix: When the slider type step size is set to 0, the verification is triggered, and when it is changed to 1, the verification disappears (#3829)
1 parent 885b65c commit 3c885dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ui/src/components/dynamics-form/constructor/items/SliderConstructor.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,15 @@ const step_rules = [
142142
{
143143
required: true,
144144
validator: (rule: any, value: any, callback: any) => {
145-
if (!value) {
146-
callback(new Error(t('dynamicsForm.Slider.step.requiredMessage1')))
147-
return false
148-
}
149145
if (value === 0) {
150146
callback(new Error(t('dynamicsForm.Slider.step.requiredMessage2')))
151147
return false
152148
}
149+
if (!value) {
150+
callback(new Error(t('dynamicsForm.Slider.step.requiredMessage1')))
151+
return false
152+
}
153+
153154
return true
154155
},
155156
trigger: 'blur',

0 commit comments

Comments
 (0)