ui: problemconfig: do not allow zero values (fix #1117)

This commit is contained in:
undefined committed 2026-01-17 23:50:17 +08:00
1 parent 40d4c9bffb
commit dc146085a8
1 file changed
+2 -2
@@ -37,8 +37,8 @@ const problemConfigSchema: JSONSchema7 = {
required: ['score'],
additionalProperties: false,
},
time: { type: 'string', pattern: '^([0-9]+(?:\\.[0-9]*)?)([mu]?)s?$' },
memory: { type: 'string', pattern: '^([0-9]+(?:\\.[0-9]*)?)([kKmMgG])[bB]?$' },
time: { type: 'string', pattern: '^([1-9][0-9]*(?:\\.[0-9]+)?|0\\.[0-9]*[1-9][0-9]*)([mu]?)s?$' },
memory: { type: 'string', pattern: '^([1-9][0-9]*(?:\\.[0-9]+)?|0\\.[0-9]*[1-9][0-9]*)([kKmMgG])[bB]?$' },
score: { type: 'integer', maximum: 100, minimum: 1 },
rateConfig: {
type: 'object',