Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

How do I change validation error messages?

I wanted to change the error validation message for the email requirement of a new user.  I needed it to specify information required for the email address.  Is there a way in the system to do this?  I ended up editing class.forms.php:

        # Validates a user-input into an instance of this field on a dynamic
        # form
        if ($this->get('required') && !$value && $this->hasData()){
            $this->_errors[] = sprintf(__('%s is a required field'),
                $this->getLabel());
if ($this->getLabel() == "Email Address"){
$this->_errors[] = __('A mydomain.org email is required');
}
}

Comments

Sign In or Register to comment.