Skip to content

Commit e5eb2fa

Browse files
committed
order-dependent validation for number of bins
1 parent 75c4660 commit e5eb2fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
type="number"
113113
v-model.number="trace_bins"
114114
:rules="[() => trace_bins!=='' || 'This field is required',
115-
() => trace_bins>=4 || 'Bins must be >= 4']"
115+
() => trace_bins>=Math.max(4, trace_order+1) || 'Bins must be >= '+Math.max(4, trace_order+1)]"
116116
hint="Number of bins in the dispersion direction."
117117
persistent-hint
118118
>

0 commit comments

Comments
 (0)