how to validate?

Permalink
Hi
I am using two text boxes in my single page.

<?php echo $form->text('eName')?>
<?php echo $dt->date('eDOB')?>
<?php echo $form->telephone('eTel')?>


how to make it as required field and how to validate it like alpha and numeric.
I read the basic validation document in concrete
http://www.concrete5.org/documentation/developers/forms/basic-valid...

but still i am not achieve the task? please give some valuable suggestions.

thanks
Kumar

 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
You are on the right page, but still if it doesn't make you sense then just have a look at the default registration controller. It has all the required code that you may need.

Rony
shankumars replied on at Permalink Reply
so you mean each field i should validate separately like this
$val->addRequired('cName', 'You must specify a valid name for your group.');
$val->addRequired('cDescription', 'Your group should have at least some kind of description.');
$val->addInteger('zipcode', 'Your zip code should only contain numbers.');

right?

there is any other option concrete5 provides to validate values in client side?

Kumar
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Client side validation can be easily done through javascript. Its not required any helper of concrete5. But for server side validation, the above code works.

Rony
shankumars replied on at Permalink Reply
ok i got it and now i am clear for the validation by this discussion.
But i have one more query, How to implement the pagination in single
pages.

I dnt know how to use the "search/sort/pagination" in single pages. will you explain what i do first and how to do implement.

because i am beginner for php and concrete also, if give some basic hint i will follow and develop my programming knowledge. its very help to my carrier.

thanks
Kumar