Archive

- Posts Tagged ‘validate’

Forms Error Catching and Displaying in Symfony

In actions.class.php page of symfony framework, you can catch errors and display those errors in template. Set errors in your action/method using: <?php if ($error) { $this->getRequest()->setError('userName', 'The user Name field cannot be left blank'); $this->getRequest()->setError('email', 'The Email field cannot be left blank'); return false; } ?> Return false is… (Continue)

Ctype – Built-in Form Input Validation Functions in PHP

In previous article you saw how these functions could be used for simply complex form input validation. Ctype_* provide checking for these types of characters: ctype_alnum -- Check for alphanumeric character(s) ctype_alpha -- Check for alphabetic character(s) ctype_cntrl -- Check for control character(s) ctype_digit -- Check for numeric character(s) ctype_graph… (Continue)

Write Correct Markup, Validate Your Markup (HTML, XHTML)

Do you ever try checking your HTML code for error? If no then you are probably writing wrong HTML code. This will cause your HTML load slow on browser. Validate your HTML code according to your document type defined in <!DOCTYPE ..Markup Validation These are free W3C Markup Validation… (Continue)