pols-validator 2.3.3 → 2.3.4
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/rules.js +2 -2
- package/package.json +3 -3
- package/src/rules.ts +2 -2
package/dist/rules.js
CHANGED
|
@@ -82,7 +82,7 @@ class PRules extends rulesEngine_1.PRulesEngine {
|
|
|
82
82
|
}
|
|
83
83
|
isDate() {
|
|
84
84
|
return this.isDateTime().add(this.isDate.name, (wrapper) => {
|
|
85
|
-
wrapper.value.
|
|
85
|
+
wrapper.value.clearClockTime();
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
isTime() {
|
|
@@ -287,7 +287,7 @@ class PRules extends rulesEngine_1.PRulesEngine {
|
|
|
287
287
|
beforeOrSameAsNow() {
|
|
288
288
|
return this.isDateTime().add(this.beforeOrSameAsNow.name, (wrapper) => {
|
|
289
289
|
const now = new pols_date_1.PDate;
|
|
290
|
-
if (wrapper.value.
|
|
290
|
+
if (wrapper.value.timestamp > now.timestamp)
|
|
291
291
|
return `'${wrapper.label}' debe ser anterior o igual a 'ahora'`;
|
|
292
292
|
});
|
|
293
293
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pols-validator",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"isomorphic-dompurify": "^2.21.0",
|
|
32
|
-
"pols-date": "^1.
|
|
33
|
-
"pols-utils": "^4.1.
|
|
32
|
+
"pols-date": "^1.2.2",
|
|
33
|
+
"pols-utils": "^4.1.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/rules.ts
CHANGED
|
@@ -79,7 +79,7 @@ export class PRules extends PRulesEngine {
|
|
|
79
79
|
|
|
80
80
|
isDate() {
|
|
81
81
|
return this.isDateTime().add(this.isDate.name, (wrapper: PRulesWrapper<PDate>) => {
|
|
82
|
-
wrapper.value.
|
|
82
|
+
wrapper.value.clearClockTime()
|
|
83
83
|
})
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -277,7 +277,7 @@ export class PRules extends PRulesEngine {
|
|
|
277
277
|
beforeOrSameAsNow() {
|
|
278
278
|
return this.isDateTime().add(this.beforeOrSameAsNow.name, (wrapper: PRulesWrapper<PDate>) => {
|
|
279
279
|
const now = new PDate
|
|
280
|
-
if (wrapper.value.
|
|
280
|
+
if (wrapper.value.timestamp > now.timestamp) return `'${wrapper.label}' debe ser anterior o igual a 'ahora'`
|
|
281
281
|
})
|
|
282
282
|
}
|
|
283
283
|
|