From 41cc0908918f48d948fe1e1fc9c74fdec58b7a60 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Tue, 24 Jan 2012 00:59:44 -0600 Subject: Better support for using field names and rule parameters in error messages. --- system/language/english/form_validation_lang.php | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'system/language') diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 6afa37a29..a1e02045f 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -25,29 +25,29 @@ * @filesource */ -$lang['required'] = "The %s field is required."; -$lang['isset'] = "The %s field must have a value."; -$lang['valid_email'] = "The %s field must contain a valid email address."; -$lang['valid_emails'] = "The %s field must contain all valid email addresses."; -$lang['valid_url'] = "The %s field must contain a valid URL."; -$lang['valid_ip'] = "The %s field must contain a valid IP."; -$lang['min_length'] = "The %s field must be at least %s characters in length."; -$lang['max_length'] = "The %s field cannot exceed %s characters in length."; -$lang['exact_length'] = "The %s field must be exactly %s characters in length."; -$lang['alpha'] = "The %s field may only contain alphabetical characters."; -$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters."; -$lang['alpha_dash'] = "The %s field may only contain alpha-numeric characters, underscores, and dashes."; -$lang['numeric'] = "The %s field must contain only numbers."; -$lang['is_numeric'] = "The %s field must contain only numeric characters."; -$lang['integer'] = "The %s field must contain an integer."; -$lang['regex_match'] = "The %s field is not in the correct format."; -$lang['matches'] = "The %s field does not match the %s field."; -$lang['is_unique'] = "The %s field must contain a unique value."; -$lang['is_natural'] = "The %s field must contain only positive numbers."; -$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero."; -$lang['decimal'] = "The %s field must contain a decimal number."; -$lang['less_than'] = "The %s field must contain a number less than %s."; -$lang['greater_than'] = "The %s field must contain a number greater than %s."; +$lang['required'] = 'The {field} field is required.'; +$lang['isset'] = 'The {field} field must have a value.'; +$lang['valid_email'] = 'The {field} field must contain a valid email address.'; +$lang['valid_emails'] = 'The {field} field must contain all valid email addresses.'; +$lang['valid_url'] = 'The {field} field must contain a valid URL.'; +$lang['valid_ip'] = 'The {field} field must contain a valid IP.'; +$lang['min_length'] = 'The {field} field must be at least {param} characters in length.'; +$lang['max_length'] = 'The {field} field cannot exceed {param} characters in length.'; +$lang['exact_length'] = 'The {field} field must be exactly {param} characters in length.'; +$lang['alpha'] = 'The {field} field may only contain alphabetical characters.'; +$lang['alpha_numeric'] = 'The {field} field may only contain alpha-numeric characters.'; +$lang['alpha_dash'] = 'The {field} field may only contain alpha-numeric characters, underscores, and dashes.'; +$lang['numeric'] = 'The {field} field must contain only numbers.'; +$lang['is_numeric'] = 'The {field} field must contain only numeric characters.'; +$lang['integer'] = 'The {field} field must contain an integer.'; +$lang['regex_match'] = 'The {field} field is not in the correct format.'; +$lang['matches'] = 'The {field} field does not match the {param} field.'; +$lang['is_unique'] = 'The {field} field must contain a unique value.'; +$lang['is_natural'] = 'The {field} field must contain only positive numbers.'; +$lang['is_natural_no_zero'] = 'The {field} field must contain a number greater than zero.'; +$lang['decimal'] = 'The {field} field must contain a decimal number.'; +$lang['less_than'] = 'The {field} field must contain a number less than {param}.'; +$lang['greater_than'] = 'The {field} field must contain a number greater than {param}.'; /* End of file form_validation_lang.php */ -- cgit v1.2.3-24-g4f1b From b4a294d1f2d93b70059c0c40cf2d32760d3e4bc4 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Sat, 14 Apr 2012 17:53:30 -0500 Subject: Fix a merge oopsie in the language file. --- system/language/english/form_validation_lang.php | 28 ------------------------ 1 file changed, 28 deletions(-) (limited to 'system/language') diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 36de4c36f..703f2e7bf 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -25,7 +25,6 @@ * @filesource */ -<<<<<<< HEAD $lang['required'] = 'The {field} field is required.'; $lang['isset'] = 'The {field} field must have a value.'; $lang['valid_email'] = 'The {field} field must contain a valid email address.'; @@ -49,33 +48,6 @@ $lang['is_natural_no_zero'] = 'The {field} field must contain a number greater t $lang['decimal'] = 'The {field} field must contain a decimal number.'; $lang['less_than'] = 'The {field} field must contain a number less than {param}.'; $lang['greater_than'] = 'The {field} field must contain a number greater than {param}.'; -======= -$lang['required'] = "The %s field is required."; -$lang['isset'] = "The %s field must have a value."; -$lang['valid_email'] = "The %s field must contain a valid email address."; -$lang['valid_emails'] = "The %s field must contain all valid email addresses."; -$lang['valid_url'] = "The %s field must contain a valid URL."; -$lang['valid_ip'] = "The %s field must contain a valid IP."; -$lang['min_length'] = "The %s field must be at least %s characters in length."; -$lang['max_length'] = "The %s field cannot exceed %s characters in length."; -$lang['exact_length'] = "The %s field must be exactly %s characters in length."; -$lang['alpha'] = "The %s field may only contain alphabetical characters."; -$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters."; -$lang['alpha_dash'] = "The %s field may only contain alpha-numeric characters, underscores, and dashes."; -$lang['numeric'] = "The %s field must contain only numbers."; -$lang['is_numeric'] = "The %s field must contain only numeric characters."; -$lang['integer'] = "The %s field must contain an integer."; -$lang['regex_match'] = "The %s field is not in the correct format."; -$lang['matches'] = "The %s field does not match the %s field."; -$lang['is_unique'] = "The %s field must contain a unique value."; -$lang['is_natural'] = "The %s field must contain only positive numbers."; -$lang['is_natural_no_zero'] = "The %s field must contain a number greater than zero."; -$lang['decimal'] = "The %s field must contain a decimal number."; -$lang['less_than'] = "The %s field must contain a number less than %s."; -$lang['less_than_equal_to'] = "The %s field must contain a number less than or equal to %s."; -$lang['greater_than'] = "The %s field must contain a number greater than %s."; -$lang['greater_than_equal_to'] = "The %s field must contain a number greater than or equal to %s."; ->>>>>>> 0f2211711deceb74157d6811116acc0376d3157d /* End of file form_validation_lang.php */ -- cgit v1.2.3-24-g4f1b From 0b05705c52c3bca7f9b3aee657c888e8ad1ff422 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Sat, 14 Apr 2012 18:04:17 -0500 Subject: Combine this feature with Fix Issue #935 in another pull request. --- system/language/english/form_validation_lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/language') diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 703f2e7bf..3d77e5eda 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -43,8 +43,8 @@ $lang['integer'] = 'The {field} field must contain an integer.'; $lang['regex_match'] = 'The {field} field is not in the correct format.'; $lang['matches'] = 'The {field} field does not match the {param} field.'; $lang['is_unique'] = 'The {field} field must contain a unique value.'; -$lang['is_natural'] = 'The {field} field must contain only positive numbers.'; -$lang['is_natural_no_zero'] = 'The {field} field must contain a number greater than zero.'; +$lang['is_natural'] = 'The {field} field must contain an ordinary number greater or equal to zero.'; +$lang['is_natural_no_zero'] = 'The {field} field must contain an ordinary number greater than zero.'; $lang['decimal'] = 'The {field} field must contain a decimal number.'; $lang['less_than'] = 'The {field} field must contain a number less than {param}.'; $lang['greater_than'] = 'The {field} field must contain a number greater than {param}.'; -- cgit v1.2.3-24-g4f1b From 7728e74f4a51576e988602ba2fa4133c2fed7df2 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Wed, 12 Dec 2012 07:12:41 -0600 Subject: Find/replace oopsie. Signed-off-by: Eric Roberts --- system/language/english/form_validation_lang.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/language') diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index 47c6bbd76..e22b3562c 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -42,8 +42,8 @@ $lang['numeric'] = 'The {field} field must contain only numbers.'; $lang['is_numeric'] = 'The {field} field must contain only numeric characters.'; $lang['integer'] = 'The {field} field must contain an integer.'; $lang['regex_match'] = 'The {field} field is not in the correct format.'; -$lang['matches'] = 'The {field} field does not match The {field} field.'; -$lang['differs'] = 'The {field} field must differ from The {field} field.'; +$lang['matches'] = 'The {field} field does not match the {param} field.'; +$lang['differs'] = 'The {field} field must differ from the {param} field.'; $lang['is_unique'] = 'The {field} field must contain a unique value.'; $lang['is_natural'] = 'The {field} field must only contain digits.'; $lang['is_natural_no_zero'] = 'The {field} field must only contain digits and must be greater than zero.'; -- cgit v1.2.3-24-g4f1b From d4eec9f3638cc31dc8965f929b74a2b3b201b8b7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 14 Dec 2012 11:07:13 +0200 Subject: Fix issue #539 Form validation language line keys were not prefixed. They are now prefixed with 'form_validation_' in order to avoid collisions. The old keys will still work if a prefixed match is not found, but are DEPRECATED and will be removed in the next major version. Also added upgrade notes and changelog entries for the new error message format from PR #961. --- system/language/english/form_validation_lang.php | 52 ++++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'system/language') diff --git a/system/language/english/form_validation_lang.php b/system/language/english/form_validation_lang.php index e22b3562c..a809f1fa8 100644 --- a/system/language/english/form_validation_lang.php +++ b/system/language/english/form_validation_lang.php @@ -26,32 +26,32 @@ */ defined('BASEPATH') OR exit('No direct script access allowed'); -$lang['required'] = 'The {field} field is required.'; -$lang['isset'] = 'The {field} field must have a value.'; -$lang['valid_email'] = 'The {field} field must contain a valid email address.'; -$lang['valid_emails'] = 'The {field} field must contain all valid email addresses.'; -$lang['valid_url'] = 'The {field} field must contain a valid URL.'; -$lang['valid_ip'] = 'The {field} field must contain a valid IP.'; -$lang['min_length'] = 'The {field} field must be at least {param} characters in length.'; -$lang['max_length'] = 'The {field} field cannot exceed {param} characters in length.'; -$lang['exact_length'] = 'The {field} field must be exactly {param} characters in length.'; -$lang['alpha'] = 'The {field} field may only contain alphabetical characters.'; -$lang['alpha_numeric'] = 'The {field} field may only contain alpha-numeric characters.'; -$lang['alpha_dash'] = 'The {field} field may only contain alpha-numeric characters, underscores, and dashes.'; -$lang['numeric'] = 'The {field} field must contain only numbers.'; -$lang['is_numeric'] = 'The {field} field must contain only numeric characters.'; -$lang['integer'] = 'The {field} field must contain an integer.'; -$lang['regex_match'] = 'The {field} field is not in the correct format.'; -$lang['matches'] = 'The {field} field does not match the {param} field.'; -$lang['differs'] = 'The {field} field must differ from the {param} field.'; -$lang['is_unique'] = 'The {field} field must contain a unique value.'; -$lang['is_natural'] = 'The {field} field must only contain digits.'; -$lang['is_natural_no_zero'] = 'The {field} field must only contain digits and must be greater than zero.'; -$lang['decimal'] = 'The {field} field must contain a decimal number.'; -$lang['less_than'] = 'The {field} field must contain a number less than {param}.'; -$lang['less_than_equal_to'] = 'The {field} field must contain a number less than or equal to {param}.'; -$lang['greater_than'] = 'The {field} field must contain a number greater than {param}.'; -$lang['greater_than_equal_to'] = 'The {field} field must contain a number greater than or equal to {param}.'; +$lang['form_validation_required'] = 'The {field} field is required.'; +$lang['form_validation_isset'] = 'The {field} field must have a value.'; +$lang['form_validation_valid_email'] = 'The {field} field must contain a valid email address.'; +$lang['form_validation_valid_emails'] = 'The {field} field must contain all valid email addresses.'; +$lang['form_validation_valid_url'] = 'The {field} field must contain a valid URL.'; +$lang['form_validation_valid_ip'] = 'The {field} field must contain a valid IP.'; +$lang['form_validation_min_length'] = 'The {field} field must be at least {param} characters in length.'; +$lang['form_validation_max_length'] = 'The {field} field cannot exceed {param} characters in length.'; +$lang['form_validation_exact_length'] = 'The {field} field must be exactly {param} characters in length.'; +$lang['form_validation_alpha'] = 'The {field} field may only contain alphabetical characters.'; +$lang['form_validation_alpha_numeric'] = 'The {field} field may only contain alpha-numeric characters.'; +$lang['form_validation_alpha_dash'] = 'The {field} field may only contain alpha-numeric characters, underscores, and dashes.'; +$lang['form_validation_numeric'] = 'The {field} field must contain only numbers.'; +$lang['form_validation_is_numeric'] = 'The {field} field must contain only numeric characters.'; +$lang['form_validation_integer'] = 'The {field} field must contain an integer.'; +$lang['form_validation_regex_match'] = 'The {field} field is not in the correct format.'; +$lang['form_validation_matches'] = 'The {field} field does not match the {param} field.'; +$lang['form_validation_differs'] = 'The {field} field must differ from the {param} field.'; +$lang['form_validation_is_unique'] = 'The {field} field must contain a unique value.'; +$lang['form_validation_is_natural'] = 'The {field} field must only contain digits.'; +$lang['form_validation_is_natural_no_zero'] = 'The {field} field must only contain digits and must be greater than zero.'; +$lang['form_validation_decimal'] = 'The {field} field must contain a decimal number.'; +$lang['form_validation_less_than'] = 'The {field} field must contain a number less than {param}.'; +$lang['form_validation_less_than_equal_to'] = 'The {field} field must contain a number less than or equal to {param}.'; +$lang['form_validation_greater_than'] = 'The {field} field must contain a number greater than {param}.'; +$lang['form_validation_greater_than_equal_to'] = 'The {field} field must contain a number greater than or equal to {param}.'; /* End of file form_validation_lang.php */ /* Location: ./system/language/english/form_validation_lang.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b