bootstrap-form icon indicating copy to clipboard operation
bootstrap-form copied to clipboard

Suggestion : add Error Class in Config file

Open AEK-BKF opened this issue 6 years ago • 2 comments

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;
    }

AEK-BKF avatar Apr 11 '18 13:04 AEK-BKF

Happy to accept a PR for this.

dwightwatson avatar Apr 12 '18 00:04 dwightwatson

What about this?

https://github.com/dwightwatson/bootstrap-form/blob/master/src/BootstrapForm.php#L998-L1006

ghost avatar Oct 18 '18 20:10 ghost