From 68699f950b025dc3426b7899249fd0ba00d96591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marisol=20Pe=C3=B1a?= <65489307+masopego@users.noreply.github.com> Date: Thu, 19 Jan 2023 13:09:40 +0100 Subject: [PATCH] fix: textarea errorMessage (#129) --- src/Questions/Textarea/index.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Questions/Textarea/index.js b/src/Questions/Textarea/index.js index c4ba9617..a766c6c1 100644 --- a/src/Questions/Textarea/index.js +++ b/src/Questions/Textarea/index.js @@ -56,16 +56,19 @@ const QuestionTextarea = ({ question, useForm }) => { maxLength: question.registerConfig.maximumLen })} /> - {errors[question.name] && errors[question.name].type && ( - - )} + {errors[question.name] && + errors[question.name].type && + question.errorMessages && + question.errorMessages[errors[question.name].type] && ( + + )} {errors[question.name] && errors[question.name].type === 'minLength' && (