bootstrap-form
bootstrap-form copied to clipboard
Suggestion : add Error Class in Config file
Hi, It will be good if you could add an attribute into config file to manager error class. Something like this : config.php
...
'error_class' => 'has_error'; // default
...
Then, edit this function :
protected function getFieldErrorClass($field, $class = config_value)
{
return $this->getFieldError($field) ? $class : null;
}
Happy to accept a PR for this.
What about this?
https://github.com/dwightwatson/bootstrap-form/blob/master/src/BootstrapForm.php#L998-L1006