Welcome Guest, Not a member yet? Register   Sign In
How do I make a form element required?
#1

[eluser]Jay Callicott[/eluser]
Is there not a way to use the validation class make form elements required? If not has anyone thought of a hack or something?
#2

[eluser]maadmac[/eluser]
[quote author="Jay Callicott" date="1193294827"]Is there not a way to use the validation class make form elements required? If not has anyone thought of a hack or something?[/quote]

Take a look at the Validation class page in the user guide again, a little more carefully. It explains how to make form elements required, or valid email addresses, or whatever...

Code:
$rules['username'] = "required";
$rules['password'] = "required";
$rules['passconf'] = "required";
$rules['email'] = "required";

$this->validation->set_rules($rules);

It's all there.
#3

[eluser]Jay Callicott[/eluser]
Ya but I'm talking about files. So it's not all there, bc file elements don't populate post.




Theme © iAndrew 2016 - Forum software by © MyBB