UNPKG

@dialpad/dialtone-vue

Version:

Vue component library for Dialpad's design system Dialtone

1 lines 922 B
{"version":3,"file":"index.cjs","sources":["../../../common/validators/index.js"],"sourcesContent":["import {\n VALIDATION_MESSAGE_TYPES,\n} from '@/common/constants';\n\nexport function validationMessageValidator (rawMessages) {\n if (!rawMessages) {\n return true;\n }\n\n return rawMessages.every(message => {\n if (typeof message === 'string') {\n return true;\n }\n\n if (typeof message === 'object') {\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(message?.type);\n }\n\n return false;\n });\n}\n\nexport default {\n validationMessageValidator,\n};\n"],"names":["validationMessageValidator","rawMessages","message","VALIDATION_MESSAGE_TYPES","index"],"mappings":"sJAIO,SAASA,EAA4BC,EAAa,CACvD,OAAKA,EAIEA,EAAY,MAAMC,GACnB,OAAOA,GAAY,SACd,GAGL,OAAOA,GAAY,SACd,OAAO,OAAOC,EAAAA,wBAAwB,EAAE,SAASD,GAAA,YAAAA,EAAS,IAAI,EAGhE,EACR,EAbQ,EAcX,CAEA,MAAAE,EAAe,CACb,2BAAAJ,CACF"}