<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script> then add javascript code: $(document).ready(function() { $("#form").validate(); }); </script>