Customize webform-fields error messages I'm using Webforms module and, in particular, a Date field. Using built-in validation and intentionally triggering the validation error, the message looks like follows:  

The entered date must be 04/04/1914 or later.


Have no error here. What I need is to customize that error message (I need to show (1) a different message, and (2) in a different language).  

Question: How can I alter the webform to override the message with my custom one?
Go ahead and download this https://drupal.org/node/1209450 module in zip. there are two zips you can download any one. here is the code can you use now

function modulename_message_alter(&amp;$message) {

    if(isset($message-&gt;messages['error'])){
       foreach($message-&gt;messages['error'] as &amp;$val) {
        if(preg_match('@The entered date must be \w+/\w+/\w+ or \w+.@',$val)){
            $val='This is not correct date';
        }
       }
    }
}