@optimiser/common 1.0.311 → 1.0.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/utility.js +14 -4
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -4561,7 +4561,7 @@ function IsAnotherObjectField(pageData, fieldName) {
|
|
|
4561
4561
|
*/
|
|
4562
4562
|
function ValidateUserInput(options) {
|
|
4563
4563
|
return __awaiter(this, void 0, void 0, function () {
|
|
4564
|
-
var inputFields, pageData, documentID, db, action, objectSchema, objectName, pageFields, schemaFields, inputField, msg, _loop_19, _i, inputField_1, name_1, state_1, _loop_20, isValid, validateResp, _a, pageFields_1, pageField, state_2, countryData, err_3;
|
|
4564
|
+
var inputFields, pageData, documentID, db, action, objectSchema, objectName, pageFields, schemaFields, inputField, msg, _loop_19, _i, inputField_1, name_1, state_1, _loop_20, isValid, isValid, validateResp, _a, pageFields_1, pageField, state_2, countryData, err_3;
|
|
4565
4565
|
return __generator(this, function (_b) {
|
|
4566
4566
|
switch (_b.label) {
|
|
4567
4567
|
case 0:
|
|
@@ -4698,9 +4698,19 @@ function ValidateUserInput(options) {
|
|
|
4698
4698
|
return [3 /*break*/, 53];
|
|
4699
4699
|
case 5:
|
|
4700
4700
|
{
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4701
|
+
if (field.ShowNextDayHoursUpto) {
|
|
4702
|
+
//When we are showing hours of Next days in Time Control
|
|
4703
|
+
//Then we are validating only length of time and it must contain collon in it.
|
|
4704
|
+
isValid = /^([0-3]?[0-9]|4[0-7]):([0-5][0-9])(:[0-5][0-9])?$/.test(fieldData);
|
|
4705
|
+
if (!isValid) {
|
|
4706
|
+
msg = 'Invalid time for ' + field.DisplayName + '!';
|
|
4707
|
+
}
|
|
4708
|
+
}
|
|
4709
|
+
else {
|
|
4710
|
+
isValid = /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(fieldData);
|
|
4711
|
+
if (!isValid) {
|
|
4712
|
+
msg = 'Invalid time for ' + field.DisplayName + '!';
|
|
4713
|
+
}
|
|
4704
4714
|
}
|
|
4705
4715
|
}
|
|
4706
4716
|
return [3 /*break*/, 53];
|