Reference: https://appdividend.com/2018/03/08/form-validation-using-jquery-laravel/
style:
Script:
style:
<style type="text/css">
.error
{
color:red;
}
</style>
Script:
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
//or
<script type="text/javascript" src="{{asset('assets/jqueryvalidation/dist/jquery.validate.min.js')}}"></script>
//then this is important
<script type="text/javascript">
$(document).ready(function () {
$('#valid_form').validate();
});
</script>
{{--<script type="text/javascript" src="{{asset('assets/jqueryvalidation/dist/jquery.validate.min.js')}}"></script>--}}
{{--<script type="text/javascript">--}}
{{--$(document).ready(function () {--}}
{{--$('#package_form').validate({--}}
{{--rules: {--}}
{{--'description': {--}}
{{--required: true--}}
{{--}--}}
{{--},--}}
{{--messages: {--}}
{{--title: "This field is required.",--}}
{{--link: "This field is required.",--}}
{{--image: "This field is required.",--}}
{{--rank: "This field is required.",--}}
{{--description: "This field is required."--}}
{{--},--}}
{{--ignore: []--}}
{{--});--}}
{{--});--}}
{{--</script>--}}
Comments
Post a Comment