HTML 5 validation and Javascript form Validation are the 2 methods of Validation to validate the user input is correct and consistent before submitting the form. HTML 5 validation and Javascript validation have their own advantages and disadvantages.
HTML 5 Validation provides set of inbuilt attributes to validate the user input. It does not require Javascript and directly applied to the input tag. It provides a simple way to validate common types such as numbers, range, email input, required validaion etc. Now HTML 5 Validation is supported by most of the web browsers.
Javascript validation allows you to define custom validation rules, handling complex validation cases, and provide error messages. When comparing to HTML 5 Validation, Javascript validation is flexible and more powerful approach to form validation.
It is very eazy to use and implement HTML 5 Validation. However, it is limited to set of validation rules. HTML 5 Validation is not flexible as Javascript validation. It does not provide custom error messages. Whereas, Javascript can provide custom error messages.