React Login Form Validations using useState hook and conditional rendering

preview_player
Показать описание
Hello....everyone. In this video I validated a simple login form consisted of email and password within the front end using useState hook and conditional rendering.

The simple idea is to save the values of inputs in a state then on form submit
we need to check both email and password states if they are empty...if yes then we need to populate the error states and show the user that error conditionally (if we have any error).

email regex

const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;

Creative Commons — Attribution-ShareAlike 3.0 Unported — CC BY-SA 3.0
Рекомендации по теме
Комментарии
Автор

tried many more vdo, but this will actually work for me thank u sir

sandeepmaurya
Автор

This is worked for me!! Very well Thank you!!!!

pradeepmadushanka
Автор

Sir can you provide source code of this vedio?

priyavandanakumari
Автор

How to validate duplicate (redundant) input value..?
In react typescript




For example,
User given name :

1st user;
Name: Anu

2nd user;
Name: Anu

In this case, how to handle?

aswinik
Автор

Please zoom in. Screen is not very clear. Text are small and blurry.

arunavamukherjee
Автор

Sir please say me how to add login button in another page link he go to only user and password

Vegaming
join shbcf.ru