mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
Merge remote-tracking branch 'origin/v3.4' into dev
This commit is contained in:
12
interface/src/validators/system.ts
Normal file
12
interface/src/validators/system.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import Schema from 'async-validator';
|
||||
|
||||
export const OTA_SETTINGS_VALIDATOR = new Schema({
|
||||
port: [
|
||||
{ required: true, message: 'Port is required' },
|
||||
{ type: 'number', min: 1025, max: 65535, message: 'Port must be between 1025 and 65535' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: 'Password is required' },
|
||||
{ type: 'string', min: 1, max: 64, message: 'Password must be between 1 and 64 characters' }
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user