Closed namlq93 closed 4 years ago
It's hard to say without knowing how the form is submitted.
It's hard to say without knowing how the form is submitted.
Here is my code:
<input name="new_password" value={props.new_password} onChange={handleInputChange} />
<input name="confirm_password" value={props.confirmation_password} onChange={handleInputChange} />
<Button onClick={handleUserPasswordChange}></Button>
I get the values of the inputs, when the user clicks submit, how can I check those values to print the appropriate MOCK_RESPONSE?
From that code I still can't see how the request is being made.
The project I just joined does not use an API from the backend but must create mock data by itself through the Axios-mock-adapter. I am making a form to change the password, if the inputs entered are correct, submit it will display successfully, if the inputs are not correct, an error will be displayed (eg input is not blank, the password is not matched...) How to do that?