@vjaimes
Posted
This is very good, though I think the code you have can be shortened. your inputs share a class so you can use querySelectAll to get all of them and then filter them by id whenever you need to validate them. A similar approach can be done for your error messages using "id" or the "data" attribute.
This is only my perspective though. I understand we all have our own coding styles so take this with a hint of salt. this is the approach I took, so feel free to look at my code whenever you want to :D
Marked as helpful
@BrandaoA
Posted
@vjaimes thanks for going through my work. I actually tried the method You talked about but i had a little bit of difficulties trying to do some validations that's why i decided to go the longer way. but i'll try it again