No commit activity in last 3 years
No release in over 3 years
Pretty form errors by default in your ActiveAdmin.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

ActiveAdmin Form Errors

Pretty form errors by default in your ActiveAdmin.

Installation

1. Import gem

gem 'active_admin-form_errors'

2. Import stylesheets (change app/assets/stylesheets/active_admin.scss)

@import 'active_admin/form_errors';

Options

Disable it in a specific resource

ActiveAdmin.register User do
  config.form_errors = false
end

Disable by default at all resources (change config/initializers/active_admin.rb)

ActiveAdmin.setup do
  config.form_errors = false
end

Show only specific errors

ActiveAdmin.register User do
  config.form_errors = lambda do
    if current_user.admin?
      resource.errors.keys
    else
      [:name, :email]
    end
  end
end

Change the color base

$form-errors-color: red; // must be before the import

@import 'active_admin/form_errors';

Maintainer

Dhyego Fernando