@lorenzoaniel
Posted
Gj on the styling Ahmet,
-
Great effort on the validation, noticed there is an issue with date validations where i can put 99 99 999 and it would still accept the credit card. If you need help with this refer to my solution for age calculator check under: age_calculator_app/src/lib/isValidDate.ts result returns booleans(true/false) for day/mm/year in object form
-
easier way to do form validations would be to include a validation library here are some: Yup/Zod, these libraries work by having the required attributes (card number, email password etc.) and describing how they should be validated in a json object or commonly referred to in this case as a 'schema'.
Good luck on your development journey
@ahmetwithat
Posted
@lorenzoaniel I honestly thought that the actual validation beyond the regex and length would be handled by the server and APIs maybe, and also wanted to practice my DOM skills by doing the basic validation on my own. But you are right, It's a better idea to let the validation to be done by libraries. Thanks for the comment!