Skip to content

Add Finnish validation methods #1114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jyrkij
Copy link
Contributor

@jyrkij jyrkij commented May 15, 2014

No description provided.

@jzaefferer
Copy link
Collaborator

Can you add tests for these? See test/methods.js as a reference.

See also #1121 for related discussion - your input would be welcome there, too.

@jyrkij
Copy link
Contributor Author

jyrkij commented May 21, 2014

Umm... How would I add the tests? I got the existing test up and running but can't figure out how to test for specific locale. Do I just add the localization files to index.html?

@jzaefferer
Copy link
Collaborator

That's a good point. Seems like a good argument to move all methods to additionals, since then we can actually test them one by one.

@jyrkij
Copy link
Contributor Author

jyrkij commented May 30, 2014

How do the additionals work? Are they required automatically? Do they override the original validators or do we as the users need to know the right validator to use?

For testability additionals seems to be better way...

@jzaefferer
Copy link
Collaborator

Currently the additionals all specify new messages. The developer using the plugin (here the user) has to include those manually (script, requirejs). None override any methods, unlike the versions in src/localization, which don't have any tests.

Its pretty easy to override the original methods though, e.g. jQuery.validator.methods.date = jQuery.validator.methods.dateITA;

I never got much input on any of this and haven't used additionals nor localization myself...

@jyrkij
Copy link
Contributor Author

jyrkij commented May 30, 2014

That's a problem for a use case like Silverstripe's UserForms module as far as I can see. There we can just load the localized methods & messages based on language. So this makes me wanna use methods_fi.js and messages_fi.js more than anything.

But again this discussion should probably be in #1121... Could you merge this for now and we'd continue the discussion in the correct place. I'd like some input from @tractorcow and @wilr as well on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants