Translate custom jQuery validation messages

前端 未结 3 1704
忘了有多久
忘了有多久 2021-01-05 06:21

I have a question to ask regarding jQuery validation plugin.

I have used localisation to change the default language of error messages to be displayed in Spanish, bu

3条回答
  •  情歌与酒
    2021-01-05 06:58

    Nothing is "translated" by the plugin. Translation is done manually and then you'd place these new messages into a localization file where they over-ride the default.

    There is also no such .validate() option called lang anywhere in this plugin.

    To use the localization files simply means including the file as such someplace after you include the plugin...

    
    
                                     
                  
提交回复
热议问题