fix(base64-to-string): prevent validation error

This commit is contained in:
Corentin Thomasset 2022-07-29 10:56:42 +02:00
parent 750a76b00f
commit 8a9e7888de
No known key found for this signature in database
GPG key ID: 3103EB5E79496F9C

View file

@ -58,7 +58,7 @@ const textOutput = computed(() => {
const { copy: copyText } = useCopy({ source: textOutput, text: 'String copied to the clipboard' });
const b64Validation = useValidation({
source: base64Input,
rules: [{ message: 'Invalid base64 string', validator: (value) => true || window.atob(value) }],
rules: [{ message: 'Invalid base64 string', validator: (value) => window.atob(value) }],
});
</script>