@dtomicic
Posted
I've done it by simply making a function which takes email as a parameter and called it in on click of a button to check if the entered email is correctly written if not it displays an error message.
I've checked your code it looks a bit complicated to be honest, you can just make it a function, make a variable with email regex and check in the function if the entered email matches the format and if not display the error message.
It might be a little outdated solution but it'll get you started and you can work on it from there.
@alisbai
Posted
@dtomicic thank u for the idea, I will create a second is file for email validation with this method. I appreciate your feedback