Parsley validation and localization

I have received a warning message to solve localization:
Accessing the method ‘setLocale’ through Validator is deprecated. Simply call ‘window.Parsley.setLocale(…)’

Currently, we use

<script>window.ParsleyValidator.setLocale('de');</script>   

How to manage without warning message as documentation is not specific about ‘window.Parsley.setLocale(…)’

Is this a browser setting?

1 Like

You recieved an answer about that two years ago, at https://github.com/guillaumepotier/Parsley.js/issues/1257

1 Like

This is Mozilla warning. It seems outdated Web developer warning.

What makes you think that it is a Mozilla warning? My understanding is that it is Parsley themself deprecating an old feature of their own software, trying to encourage people to use a preferred technique instead.

I have seen this warning from Mozilla. Did you find a new link to check localization for Parsley? I’m not sure about new one even it is an old warning.

Here is the Parsely code directly responsible for showing that message. https://parsleyjs.org/doc/annotated-source/main.html

window.ParsleyValidator[method] = function () {
    Utils.warnOnce(`Accessing the method '${method}' through Validator is deprecated. Simply call 'window.Parsley.${method}(...)'`);
    return window.Parsley[method](...arguments);
  };

I remain unconvinced that Mozilla is responsible for the warning.

I’m new to this. Thank you for this tip.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.