You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Localizing the Validator (finnish)


Validator demo 6 / 6 : Localizing the Validator (finnish)

Terveisiä äidille! Junassa on hauska matkustaa. Kokoomus haisee. Some random finnish. Here is the mandatory localization example.

Sample registration form

Enter bad values and then press the submit button.

JavaScript coding

We use $.tools.validator.localize method to supply a different language for all build-in validators. Look for localization documentation for the details.

// supply the language
$.tools.validator.localize("fi", {
	'*'			: 'Virheellinen arvo',
	':email'  	: 'Virheellinen sähköpostiosoite',
	':number' 	: 'Arvon on oltava numeerinen',
	':url' 		: 'Virheellinen URL',
	'[max]'	 	: 'Arvon on oltava pienempi, kuin $1',
	'[min]'		: 'Arvon on oltava suurempi, kuin $1',
	'[required]'	: 'Kentän arvo on annettava'
});

// use the finnish language in the validator
$("#myform").validator({ lang: 'fi' });

Here is the standalone version of this demo. You can freely study and copy its source code.