Skip to content

Commit

Permalink
Merge pull request #11 from bdukes/master
Browse files Browse the repository at this point in the history
Add knockout validation
  • Loading branch information
bdukes committed Apr 15, 2014
2 parents 4e78e75 + 5e79b70 commit 39dfaf1
Show file tree
Hide file tree
Showing 16 changed files with 1,658 additions and 0 deletions.
Binary file not shown.
Binary file added InstallPackages/knockout.validation_1.0.2.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ol>
<li>
<b>1.0.2</b>
<ul>
<li>Support for Knockout 2.2</li>
</ul>
</li>
</ol>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>Licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a></p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <reference path="../Src/knockout.validation.js" />

/************************************************
* This is an example localization page. All of these
* messages are the default messages for ko.validation
*
* Currently ko.validation only does a single parameter replacement
* on your message (indicated by the {0}).
*
* The parameter that you provide in your validation extender
* is what is passed to your message to do the {0} replacement.
*
* eg: myProperty.extend({ minLength: 5 });
* ... will provide a message of "Please enter at least 5 characters"
* when validated
*
* This message replacement obviously only works with primitives
* such as numbers and strings. We do not stringify complex objects
* or anything like that currently.
*/

ko.validation.localize({
required: 'Το πεδίο αυτό είναι υποχρεωτικό.',
min: 'Παρακαλώ εισάγετε μια τιμή μεγαλύτερη ή ίση από {0}.',
max: 'Παρακαλώ εισάγετε μια τιμή μικρότερη ή ίση από {0}.',
minLength: 'Παρακαλώ εισάγετε τουλάχιστον {0} χαρακτήρες.',
maxLength: 'Παρακαλώ εισάγετε το πολύ {0} χαρακτήρες.',
pattern: 'Παρακαλώ ελέγξτε την τιμή αυτή.',
step: 'Η τιμή πρέπει να αυξηθεί κατά {0}',
email: 'Η διεύθυνση email δεν έχει έγκυρη μορφή',
date: 'Παρακαλώ εισάγετε μια έγκυρη ημερομηνία',
dateISO: 'Παρακαλώ εισάγετε μια έγκυρη ημερομηνία',
number: 'Παρακαλώ εισάγετε έναν αριθμό',
digit: 'Παρακαλώ εισάγετε ένα ψηφίο',
phoneUS: 'Παρακαλώ εισάγετε έναν σωστό αριθμό τηλεφώνου',
equal: 'Οι τιμές πρέπει να είναι ίσες',
notEqual: 'Παρακαλώ επιλέξτε μια άλλη τιμή.',
unique: 'Παρακαλώ βεβαιωθείτε ότι η τιμή είναι μοναδική.'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <reference path="../Src/knockout.validation.js" />

/************************************************
* This is an example localization page. All of these
* messages are the default messages for ko.validation
*
* Currently ko.validation only does a single parameter replacement
* on your message (indicated by the {0}).
*
* The parameter that you provide in your validation extender
* is what is passed to your message to do the {0} replacement.
*
* eg: myProperty.extend({ minLength: 5 });
* ... will provide a message of "Please enter at least 5 characters"
* when validated
*
* This message replacement obviously only works with primitives
* such as numbers and strings. We do not stringify complex objects
* or anything like that currently.
*/

ko.validation.localize({
required: 'This field is required.',
min: 'Please enter a value greater than or equal to {0}.',
max: 'Please enter a value less than or equal to {0}.',
minLength: 'Please enter at least {0} characters.',
maxLength: 'Please enter no more than {0} characters.',
pattern: 'Please check this value.',
step: 'The value must increment by {0}',
email: 'This is not a proper email address',
date: 'Please enter a proper date',
dateISO: 'Please enter a proper date',
number: 'Please enter a number',
digit: 'Please enter a digit',
phoneUS: 'Please specify a valid phone number',
equal: 'Values must equal',
notEqual: 'Please choose another value.',
unique: 'Please make sure the value is unique.'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <reference path="../Src/knockout.validation.js" />

/************************************************
* This is an example localization page. All of these
* messages are the default messages for ko.validation
*
* Currently ko.validation only does a single parameter replacement
* on your message (indicated by the {0}).
*
* The parameter that you provide in your validation extender
* is what is passed to your message to do the {0} replacement.
*
* eg: myProperty.extend({ minLength: 5 });
* ... will provide a message of "Please enter at least 5 characters"
* when validated
*
* This message replacement obviously only works with primitives
* such as numbers and strings. We do not stringify complex objects
* or anything like that currently.
*/

ko.validation.localize({
required: 'Este campo es obligatorio',
min: 'Por favor, introduzca un valor igual o mayor a {0}',
max: 'Por favor, introduzca un valor menor o igual a {0}',
minLength: 'Por favor, introduzca al menos {0} caracteres',
maxLength: 'Por favor, no introduzca más de {0} caracteres',
pattern: 'Por favor, compruebe este campo',
step: 'El valor debe incrementarse por {0}',
email: 'Este no es una dirección de email correcta',
date: 'Por favor, introduzca una fecha correcta',
dateISO: 'Por favor, introduzca una fecha correcta',
number: 'Por favor, introduzca un número',
digit: 'Por favor, introduzca un dígito',
phoneUS: 'Por favor, introduzca un número de teléfono válido para EEUU',
equal: 'Los valores deben ser iguales',
notEqual: 'Por favor, elija otro valor',
unique: 'Por favor, asegurese de que el valor sea único'
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <reference path="../Src/knockout.validation.js" />

/************************************************
* This is an example localization page. All of these
* messages are the default messages for ko.validation
*
* Currently ko.validation only does a single parameter replacement
* on your message (indicated by the {0}).
*
* The parameter that you provide in your validation extender
* is what is passed to your message to do the {0} replacement.
*
* eg: myProperty.extend({ minLength: 5 });
* ... will provide a message of "Please enter at least 5 characters"
* when validated
*
* This message replacement obviously only works with primitives
* such as numbers and strings. We do not stringify complex objects
* or anything like that currently.
*/

ko.validation.localize({
required: 'Ce champ est obligatoire.',
min: 'Veuillez saisir une valeur supérieure ou égale à {0}.',
max: 'Veuillez saisir une valeur inférieure ou égale à {0}.',
minLength: 'Veuillez saisir au moins {0} caractères.',
maxLength: 'Veuillez saisir au plus {0} caractères.',
pattern: 'Veuillez corriger ce champ.',
step: 'Le pas d\'incrémentation de la valeur doit être de {0}.',
email: 'Ceci n\'est pas une adresse électronique valide.',
date: 'Veuillez saisir une date valide.',
dateISO: 'Veuillez saisir une date (ISO) valide.',
number: 'Veuillez saisir un nombre.',
digit: 'Veuillez saisir un chiffre.',
phoneUS: 'Veuillez saisir un numéro de téléphone valide.',
equal: 'Les valeurs doivent être égales.',
notEqual: 'Veuillez saisir une autre valeur.',
unique: 'Veuillez vérifier que la valeur est unique.'
});
Loading

0 comments on commit 39dfaf1

Please sign in to comment.