79145201

Date: 2024-10-31 14:55:48
Score: 2.5
Natty:
Report link

I've faced this problem once! I set validate method with some conditions like follows:

//...
validate: values => {
const errors: IForm = { //form inputs like username: "" <- empty string
 }
//...

each time I wanted to submit the form, it didn't triggered! so the problem as can be seen above was so simple! the validation is the problem! why?

const errors: IForm | null {username: null} <- it must be null to work correctly
Reasons:
  • Blacklisted phrase (0.5): why?
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Hamed