Fix issue #935 #958

Closed
wants to merge 3 commits into from

2 participants

@cryode

Adjusts the wording of is_natural and is_natural_no_zero form validation rule error messages.

cryode added some commits Jan 23, 2012
@cryode cryode Fix issue #935
Adjusts the wording of is_natural and is_natural_no_zero form validation rule error messages.
3487bb2
@cryode cryode Double quotes are unnecessary. 0da7938
@cryode cryode Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter int…
…o bug/form_validation_lang

Conflicts:
	system/language/english/form_validation_lang.php
55bdd5a
@narfbg

Could you just remove * greater or equal to zero* from the sentence? It has the same meaning without it ...

@narfbg narfbg commented on the diff Jun 11, 2012
system/language/english/form_validation_lang.php
+$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 an ordinary number greater or equal to zero.';
@narfbg
narfbg added a note Jun 11, 2012

An "ordinary" number doesn't mean the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@cryode

In mathematical terms, yes. But this was meant to be more human-readable, and an average user won't be thinking in mathematical terms. This was my opinion on how it could be reworded better - I'm open to other suggestions.

@narfbg

How about this:

$lang['is_natural']        = 'The %s field must contain digits only.';
$lang['is_natural_no_zero']    = 'The %s field must contain digits only and must be a positive number.';

Also, this is a configurable lang file, but it's still probably better if it's noted as a bugfix in the changelog.

@narfbg

Already fixed.

@narfbg narfbg closed this Oct 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment