Refused to evaluate a string as JavaScript

Hello, I'm trying to use Vue with the Vuelidate library to validate my inputs, but when I try to validate it gives me the error:

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' http://localhost".

How would I go about resolving this?

If relevant, follow the code:

import { useVuelidate } from '@vuelidate/core'
import { email, required } from '@vuelidate/validators'

const form = reactive({
    email: '',
    password: '',
    loading: false,
})
const rules = computed(() => {
    return {
        email: { required, email },
        password: { required },
    }
})
const $v = useVuelidate(rules, form)

async function login() {
    $v.value.$validate()
  ....
}


<template>

<div class="flex flex-col col-span-12">
    <label class="mb-2">Email</label>
    <InputText v-model="form.email" placeholder="Informe seu email" :class="{
                'dark:!border-red-500 dark:!focus:border-red-500 !border-red-500 focus:border-red-500':
                    $v.email.$error,
            }" @change="$v.email.$touch" @keyup.enter="login" />
    <small id="text-error" class="mt-2 p-error">{{
        $v.email.$errors[0]?.$message || "&nbsp;"
        }}</small>
</div>
</template>
Was this page helpful?