tango-app-api-client 3.6.12 → 3.6.13
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/package.json +1 -1
- package/src/dtos/client.dtos.js +0 -7
package/package.json
CHANGED
package/src/dtos/client.dtos.js
CHANGED
|
@@ -423,18 +423,11 @@ export const createStoreRequestSchema = joi.object( {
|
|
|
423
423
|
storeId: joi.string().required(),
|
|
424
424
|
dateString: joi.string().required().custom( ( value, helpers ) => {
|
|
425
425
|
const inputDate = dayjs( value, 'YYYY-MM-DD', true );
|
|
426
|
-
const today = dayjs();
|
|
427
426
|
|
|
428
427
|
if ( !inputDate.isValid() ) {
|
|
429
428
|
return helpers.error( 'any.invalid' );
|
|
430
429
|
}
|
|
431
430
|
|
|
432
|
-
const diff = today.diff( inputDate, 'day' );
|
|
433
|
-
|
|
434
|
-
if ( diff > 3 ) {
|
|
435
|
-
return helpers.message( 'The request is not sent for a period exceeding 3 days' );
|
|
436
|
-
}
|
|
437
|
-
|
|
438
431
|
return value;
|
|
439
432
|
} ),
|
|
440
433
|
|