Fix regex
This commit is contained in:
parent
94d342ce63
commit
6f2097ed46
@ -7,7 +7,7 @@ validator.addFormat({
|
|||||||
return dateRegexp.test(value) ? null : 'A valid ISO 8601 full-date string is expected';
|
return dateRegexp.test(value) ? null : 'A valid ISO 8601 full-date string is expected';
|
||||||
},
|
},
|
||||||
'time': function(value) {
|
'time': function(value) {
|
||||||
const timeRegexp = /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
|
const timeRegexp = /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
|
||||||
return timeRegexp.test(value) ? null : 'A valid ISO 8601 full-time string is expected';
|
return timeRegexp.test(value) ? null : 'A valid ISO 8601 full-time string is expected';
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user