feat: import validators from the new library
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
|
||||
<script>
|
||||
import { format, parseISO } from 'date-fns';
|
||||
import { required, url } from 'vuelidate/lib/validators';
|
||||
import { required, url } from '@vuelidate/validators';
|
||||
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||
import MultiselectDropdown from 'shared/components/ui/MultiselectDropdown.vue';
|
||||
import HelperTextPopup from 'dashboard/components/ui/HelperTextPopup.vue';
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import aiMixin from 'dashboard/mixins/aiMixin';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength, email } from 'vuelidate/lib/validators';
|
||||
import { required, minLength, email } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
export default {
|
||||
props: {
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { requiredIf } from 'vuelidate/lib/validators';
|
||||
import { requiredIf } from '@vuelidate/validators';
|
||||
const allKeysRequired = value => {
|
||||
const keys = Object.keys(value);
|
||||
return keys.every(key => value[key]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import emailValidator from 'vuelidate/lib/validators/email';
|
||||
import { email as emailValidator } from '@vuelidate/validators';
|
||||
|
||||
export const validEmailsByComma = value => {
|
||||
if (!value.length) return true;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import Modal from '../../Modal.vue';
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { required, requiredIf } from 'vuelidate/lib/validators';
|
||||
import { required, requiredIf } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
validations: {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<script>
|
||||
import Modal from 'dashboard/components/Modal.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
|
||||
import MergeContactSummary from 'dashboard/modules/contact/components/MergeContactSummary.vue';
|
||||
import ContactDropdownItem from './ContactDropdownItem.vue';
|
||||
|
||||
@@ -156,7 +156,7 @@ import {
|
||||
ExceptionWithMessage,
|
||||
} from 'shared/helpers/CustomErrors';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, email } from 'vuelidate/lib/validators';
|
||||
import { required, email } from '@vuelidate/validators';
|
||||
import countries from 'shared/constants/countries.js';
|
||||
import { isPhoneNumberValid } from 'shared/helpers/Validators';
|
||||
import parsePhoneNumber from 'libphonenumber-js';
|
||||
|
||||
@@ -251,7 +251,7 @@ import { INBOX_TYPES } from 'shared/mixins/inboxMixin';
|
||||
import { ExceptionWithMessage } from 'shared/helpers/CustomErrors';
|
||||
import { getInboxSource } from 'dashboard/helper/inbox';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, requiredIf } from 'vuelidate/lib/validators';
|
||||
import { required, requiredIf } from '@vuelidate/validators';
|
||||
import inboxMixin from 'shared/mixins/inboxMixin';
|
||||
import FileUpload from 'vue-upload-component';
|
||||
import AttachmentPreview from 'dashboard/components/widgets/AttachmentsPreview';
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { CONTACTS_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
import Modal from 'dashboard/components/Modal.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import allLocales from 'shared/constants/locales.js';
|
||||
import { PORTALS_EVENTS } from '../../../../helper/AnalyticsHelper/events';
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { convertToCategorySlug } from 'dashboard/helper/commons.js';
|
||||
import { PORTALS_EVENTS } from '../../../../../helper/AnalyticsHelper/events';
|
||||
import CategoryNameIconInput from './NameEmojiInput.vue';
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { convertToCategorySlug } from 'dashboard/helper/commons.js';
|
||||
import { PORTALS_EVENTS } from '../../../../../helper/AnalyticsHelper/events';
|
||||
import CategoryNameIconInput from './NameEmojiInput.vue';
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import CsmlMonacoEditor from './CSMLMonacoEditor.vue';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength, email } from 'vuelidate/lib/validators';
|
||||
import { required, minLength, email } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import WootSubmitButton from '../../../../components/buttons/FormSubmitButton.vue';
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { convertToAttributeSlug } from 'dashboard/helper/commons.js';
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { ATTRIBUTE_TYPES } from './constants';
|
||||
import customAttributeMixin from '../../../../mixins/customAttributeMixin';
|
||||
export default {
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
|
||||
import campaignMixin from 'shared/mixins/campaignMixin';
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
|
||||
import campaignMixin from 'shared/mixins/campaignMixin';
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
|
||||
import WootSubmitButton from '../../../../components/buttons/FormSubmitButton.vue';
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<script>
|
||||
/* eslint no-console: 0 */
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
|
||||
import WootSubmitButton from '../../../../components/buttons/FormSubmitButton.vue';
|
||||
|
||||
@@ -76,7 +76,7 @@ import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import SettingsSection from 'dashboard/components/SettingsSection.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -92,7 +92,7 @@ import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import SettingsSection from 'dashboard/components/SettingsSection.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import InputRadioGroup from './components/InputRadioGroup.vue';
|
||||
import SingleSelectDropdown from './components/SingleSelectDropdown.vue';
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ import { useAlert } from 'dashboard/composables';
|
||||
import Widget from 'dashboard/modules/widget-preview/components/Widget.vue';
|
||||
import InputRadioGroup from './components/InputRadioGroup.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import { LOCAL_STORAGE_KEYS } from 'dashboard/constants/localStorage';
|
||||
import { LocalStorage } from 'shared/helpers/localStorage';
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
|
||||
import { isPhoneE164OrEmpty } from 'shared/helpers/Validators';
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
import PageHeader from '../../SettingsSubPageHeader.vue';
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
|
||||
const shouldStartWithPlusSign = (value = '') => value.startsWith('+');
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
import { isPhoneE164OrEmpty, isNumber } from 'shared/helpers/Validators';
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
/* global FB */
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import LoadingState from 'dashboard/components/widgets/LoadingState.vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ChannelApi from '../../../../../api/channels';
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
import PageHeader from '../../SettingsSubPageHeader.vue';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
import PageHeader from '../../SettingsSubPageHeader.vue';
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import router from '../../../../index';
|
||||
import { isPhoneE164OrEmpty } from 'shared/helpers/Validators';
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required, email } from 'vuelidate/lib/validators';
|
||||
import { required, email } from '@vuelidate/validators';
|
||||
import router from '../../../../../index';
|
||||
import PageHeader from '../../../SettingsSubPageHeader.vue';
|
||||
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { minValue } from 'vuelidate/lib/validators';
|
||||
import { minValue } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import configMixin from 'shared/mixins/configMixin';
|
||||
import SettingsSection from '../../../../../components/SettingsSection.vue';
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ import SettingsSection from '../../../../../components/SettingsSection.vue';
|
||||
import ImapSettings from '../ImapSettings.vue';
|
||||
import SmtpSettings from '../SmtpSettings.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required } from 'vuelidate/lib/validators';
|
||||
import { required } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, url } from 'vuelidate/lib/validators';
|
||||
import { required, url } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
|
||||
export default {
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, url, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, url, minLength } from '@vuelidate/validators';
|
||||
import webhookMixin from './webhookMixin';
|
||||
import wootConstants from 'dashboard/constants/globals';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
|
||||
export const validLabelCharacters = (str = '') => !!str && !str.includes(' ');
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<script>
|
||||
import MacroNodes from './MacroNodes.vue';
|
||||
import MacroProperties from './MacroProperties.vue';
|
||||
import { required, requiredIf } from 'vuelidate/lib/validators';
|
||||
import { required, requiredIf } from '@vuelidate/validators';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { parseAPIErrorResponse } from 'dashboard/store/utils/api';
|
||||
import FormButton from 'v3/components/Form/Button.vue';
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import FormButton from 'v3/components/Form/Button.vue';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength, email } from 'vuelidate/lib/validators';
|
||||
import { required, minLength, email } from '@vuelidate/validators';
|
||||
export default {
|
||||
components: {
|
||||
FormButton,
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
required,
|
||||
minLength,
|
||||
minValue,
|
||||
decimal,
|
||||
} from 'vuelidate/lib/validators';
|
||||
import { required, minLength, minValue, decimal } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
name: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
|
||||
export default {
|
||||
title: {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength } from 'vuelidate/lib/validators';
|
||||
import { required, minLength } from '@vuelidate/validators';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import FormInput from '../../../components/Form/Input.vue';
|
||||
import SubmitButton from '../../../components/Button/SubmitButton.vue';
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import { required, minLength, email } from 'vuelidate/lib/validators';
|
||||
import { required, minLength, email } from '@vuelidate/validators';
|
||||
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
||||
import FormInput from '../../../../components/Form/Input.vue';
|
||||
import { resetPassword } from '../../../../api/auth';
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
<script>
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, minLength, email } from 'vuelidate/lib/validators';
|
||||
import { required, minLength, email } from '@vuelidate/validators';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useAlert } from 'dashboard/composables';
|
||||
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { useVuelidate } from '@vuelidate/core';
|
||||
import { required, email } from 'vuelidate/lib/validators';
|
||||
import { required, email } from '@vuelidate/validators';
|
||||
import { getContrastingTextColor } from '@chatwoot/utils';
|
||||
|
||||
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
|
||||
|
||||
Reference in New Issue
Block a user