Editor and backend!

This commit is contained in:
Mawoka
2022-12-21 22:03:37 +01:00
parent 07f242e6cd
commit 0af5aeef95
13 changed files with 331 additions and 219 deletions
+2
View File
@@ -39,11 +39,13 @@
}
const validateInput = async (data: EditorData) => {
// console.log("input", data)
try {
await dataSchema.validate(data, { abortEarly: false });
schemaInvalid = false;
yupErrorMessage = '';
} catch (err) {
console.log('erro!', err.errors);
schemaInvalid = true;
yupErrorMessage = err.errors ? err.errors[0] : '';
}