# Input Field validation message doesn’t show or even logged on React new course

**URL:** <https://forum.codewithmosh.com/t/input-field-validation-message-doesn-t-show-or-even-logged-on-react-new-course/18778>\
**Category:** React\
**Created:** [March 14, 2023, 7:12pm UTC](https://forum.codewithmosh.com/t/input-field-validation-message-doesn-t-show-or-even-logged-on-react-new-course/18778 "2023-03-14T19:12:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjviana](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mjviana](https://forum.codewithmosh.com/u/mjviana)\
**Post date:** [March 14, 2023, 7:12pm UTC](https://forum.codewithmosh.com/t/input-field-validation-message-doesn-t-show-or-even-logged-on-react-new-course/18778/1 "2023-03-14T19:12:38Z")

</div>

![Screenshot 2023-03-14 at 19.12.23](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/1/15982e2fc87fb0ed793510049628e10614efb52b.png)

---

<div class="post-metadata">

**Author:** ![mjviana](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mjviana](https://forum.codewithmosh.com/u/mjviana)\
**Post date:** [March 14, 2023, 7:53pm UTC](https://forum.codewithmosh.com/t/input-field-validation-message-doesn-t-show-or-even-logged-on-react-new-course/18778/2 "2023-03-14T19:53:28Z")

</div>

It seems that I have found the problem… I hate being nerd snipped 😃  
Prettier was the guilty!  
He as adding some parenthesis around the input rules. As you can see bellow.

 ![Screenshot 2023-03-14 at 19.45.48](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/7/74603c21d970178382b1821f006014288ec36484.png)  
I noticed this because the name property was being logged as ‘undefined’ as you can see in the output screenshot. To solve this I deactivated prettier and repeated the process and then I noticed that without parenthesis all worked fine. Also noticed that with parenthesis an alert box shows up when theres an error (the one from the first screen shot).  
Code without parenthesis:  
\<input  
{…register(‘name’, { required: true, minLength: 3 })}  
id=“name”  
type=“text”  
className=“form-control”  
/\>
