Consider a case where you want to enter regular expression and validate it. Here I will show you how to write a validation function. For example consider YOURMODULE_admin_settings_validate function
In my example I am using a form and a submit button.From $form_state array you can get the input value after submit. You need this value to match with the string. See the code below.
Redirection
In this article I am going to tell you how to redirect anonymous users to a login form on 403 access denied pages in Drupal. There are some contributed module that provides you this feature but, if you really want to create a custom one for your site just try this. Here I will show you a PHP snippet that redirecting to login page for anonymous users on access denied.
In a common secnario if a user types the url of a Drupal based website without the 'www'.prefix they will be automatically redirected to the required site with the complete url. This is very convenient for most web users who do not want to type in the obvious 'www' prefix. Webmasters can configure this by changing the settings of the Drupal .htaccess file. However this will be a problem if the Drupal site has a mobile version with an 'm.' prefix. Users wishing to access the mobile version of that Drupal site will inevitably be redirected to the main website.
Redirection
Redirection is a WordPress plugin to manage 301 redirections and keep track of 404 errors without requiring knowledge of Apache .htaccess files.
Path redirect is the popular alternative in Drupal
Zyxware is conducting a Drupal workshop in association with COMSOC of College of Engineering Trivandrum and IEEE Student Branch of Younus College of Engineering and Technology. The workshop will be held at Central Computer Facility, College of Engineering Trivandrum on the 20th of August 2011. You can register for the workshop at http://ieeesbcet.org/stac-drupal-workshop/