@farm-investimentos/front-mfe-components 15.3.2 → 15.3.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "15.3.2",
3
+ "version": "15.3.3",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -121,11 +121,17 @@ export default defineComponent({
121
121
  return this.required ? !!value || value != '' || 'Campo obrigatório' : true;
122
122
  },
123
123
  checkMax: value => {
124
+ if(!this.required && value.length === 0) {
125
+ return true;
126
+ }
124
127
  return this.max && new Date(convertDate(value)) > new Date(this.max)
125
128
  ? 'A data está fora do período permitido'
126
129
  : true;
127
130
  },
128
131
  checkMin: value => {
132
+ if(!this.required && value.length === 0) {
133
+ return true;
134
+ }
129
135
  if(this.min) {
130
136
  const dateSelected = new Date(convertDate(value));
131
137
  const dateMin = new Date(convertDate(this.min));