Welcome Guest, Not a member yet? Register   Sign In
form validation rule question
#1

[eluser]vps4[/eluser]
what different with

alpha_numeric
numeric
is_numeric
integer
is_natural
is_natural_no_zero

it seems they are same thing.

$lang['alpha_numeric'] = "The %s field may only contain alpha-numeric characters.";
$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['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.";
#2

[eluser]TheFuzzy0ne[/eluser]
Code:
alpha_numeric      # letters and numbers
numeric            # numbers and characters to do with numbers (- and ., and perhaps +)?
is_numeric         # I think that's just synonym for the above, perhaps for the previous validation library? I don't know, but it's not in the reference. :)
integer            # numbers only (including - and perhaps +)?
is_natural         # 0 or more
is_natural_no_zero # 1 or more
Hope this helps.




Theme © iAndrew 2016 - Forum software by © MyBB