whenever a capital letter gets inputted into the input box, I want the state to increment a entry called uppercaseLetters for every uppercase letter that is in the input box…? If you get me…?
Its a password strength test so looking for uppercase letters…
Does some part of the UI dynamically change based on if the password is accepted or not?
Because if it’s just a static check, you can also wait until submit and the element (assuming it’s an input of type password) also has the pattern attribute you can use for validation.
Whenever a user inputs characters it updates the UI whenever a key gets entered… So yes, it changes dynamically, so a bit confused how to get this to work
If it’s a controlled input you can check the value on the event target in the handler function you have on the input element and make whatever state changes or updates you need.
If you can post a link to a Codesandbox or something like that it would help.