How to give custom validation error messages for HTML validations?

前端 未结 2 425
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 10:59

When I use default HTML validation it shows the default error messages which is not I want to show to my clients. I need to customize the message and give different massages for

2条回答
  •  遥遥无期
    2021-01-29 11:20

    It's totally possible with custom libraries in jQuery which I would suggest - https://github.com/aslamanver/abvalidate

    Custom Message - jQuery Form Validation - abValidate.js

    ab-validation="required|Hey dude you missed that,min:5| No no you want to type more" name="name"
    

    Use this library by adding these CDNs

    
    
    
    
    
                                     
                  
提交回复
热议问题