\n \n
{{ label }}*
\n \n \n \n \n \n \n \n \n \n\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./DfInput.vue?vue&type=template&id=b292c2e6&scoped=true\"\nimport script from \"./DfInput.vue?vue&type=script&lang=js\"\nexport * from \"./DfInput.vue?vue&type=script&lang=js\"\nimport style0 from \"./DfInput.vue?vue&type=style&index=0&id=b292c2e6&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b292c2e6\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DfInput.vue?vue&type=style&index=0&id=b292c2e6&prod&lang=scss&scoped=true\"","import i18n from '@/language'\n\nexport function required(value) {\n return !!value || value === false || i18n.t('campo_obrigatorio')\n}\n\nexport function equalPasswords(value, comparisonValue) {\n return value === comparisonValue\n ? true\n : i18n.t('validations.different_passwords')\n}\n\nexport function maxLength(value, maxLength) {\n if (typeof value === 'number') value = String(value)\n if (value?.length > maxLength)\n return i18n.t('validations.max_length', [maxLength])\n return true\n}\n\nexport function minLength(value, minLength) {\n if (typeof value === 'number') value = String(value)\n if (value?.length < minLength)\n return i18n.t('validations.min_length', [minLength])\n return true\n}\n\nexport function mandatoryPasswordCharacters(value) {\n const upperCaseLowerCaseAndNumbersRegex = /^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d).+$/\n\n return (\n upperCaseLowerCaseAndNumbersRegex.test(value) ||\n i18n.t('validations.wrong_password_characters')\n )\n}\n\nexport function text(value) {\n if (/^[a-zA-Zà-úÀ-ÚçÇ\\s]+$/.test(value)) return true\n return i18n.t('validations.text_only')\n}\n\nexport function validCardNumber(value) {\n const cleanedCardNumber = value.replace(/\\D/g, '')\n if (cleanedCardNumber.length < 14)\n return i18n.t('validations.card_number_length')\n let sum = 0\n let shouldDouble = false\n for (let i = cleanedCardNumber.length - 1; i >= 0; i--) {\n let digit = parseInt(cleanedCardNumber.charAt(i), 10)\n\n if (shouldDouble) {\n if ((digit *= 2) > 9) digit -= 9\n }\n\n sum += digit\n shouldDouble = !shouldDouble\n }\n\n if (sum % 10 === 0) return true\n return i18n.t('validations.invalid_card_number')\n}\n\nexport function validCardExpirationDate(value) {\n const expiry = value.replace(/\\D/g, '')\n let month = parseInt(expiry.substring(0, 2), 10)\n let year = parseInt(expiry.substring(2, 7), 10)\n\n if (month < 1 || month > 12) {\n return i18n.t('validations.invalid_month')\n }\n\n let currentYear = new Date().getFullYear()\n if (year < currentYear) {\n return i18n.t('validations.invalid_year')\n }\n if (year === currentYear && month < new Date().getMonth() + 1) {\n return i18n.t('validations.month_previous_than_current')\n }\n\n return true\n}\n\nexport function validCPF(value) {\n const cleanedCPF = value.replace(/\\D/g, '')\n if (cleanedCPF.length !== 11)\n return i18n.t('validations.document_number_length')\n let sum = 0\n let remainder\n if (\n cleanedCPF == '00000000000' ||\n cleanedCPF == '11111111111' ||\n cleanedCPF == '22222222222' ||\n cleanedCPF == '33333333333' ||\n cleanedCPF == '44444444444' ||\n cleanedCPF == '55555555555' ||\n cleanedCPF == '66666666666' ||\n cleanedCPF == '77777777777' ||\n cleanedCPF == '88888888888' ||\n cleanedCPF == '99999999999'\n ) {\n return i18n.t('validations.invalid_document_number')\n }\n for (let i = 1; i <= 9; i++)\n sum = sum + parseInt(cleanedCPF.substring(i - 1, i)) * (11 - i)\n remainder = (sum * 10) % 11\n if (remainder == 10 || remainder == 11) remainder = 0\n if (remainder != parseInt(cleanedCPF.substring(9, 10)))\n return i18n.t('validations.invalid_document_number')\n sum = 0\n for (let i = 1; i <= 10; i++)\n sum = sum + parseInt(cleanedCPF.substring(i - 1, i)) * (12 - i)\n remainder = (sum * 10) % 11\n if (remainder == 10 || remainder == 11) remainder = 0\n if (remainder != parseInt(cleanedCPF.substring(10, 11)))\n return i18n.t('validations.invalid_document_number')\n return true\n}\n\nexport function validEmail(value) {\n return /.+@.+\\..+/.test(value) || i18n.t('validations.invalid_email')\n}\n"],"sourceRoot":""}