Not apply invalid first before valid? (textarea valid after .replace)

So is display green by default why?

Any idea?


The empty input isn’t invalid unless you use the required attribute in it.

1 Like

Thanks for your help!
From this got an another problem. Like I have 15 char required to be valid in textarea. And have a word to detect to replace but that is not that long like min char required and that is make valid after .replace?

Any idea why? or what can to do? Word is from this to tothis


So how can prevent to be valid textarea after .replace? as is not contain 15 char minimum?


I think changing the value like that will mess with the build-in validation. You can check the validity states on the element console.log( (more info ValidityState). You might have to do some custom validation.

Can I ask why you are changing the users input? That doesn’t seem like something you would expect as a user to have happen.

1 Like

You know just try out all things as possible. I got it. Yes for sure is break something there so is not so useful to use :smiley:. Thank you!