get validations from model
This code yields an array of required fields. It should be adaptable to your needs.
@required_fields = []
ModelName.validators.each do |v|
@required_fields << v.attributes.first if v.kind == :presence
end
You don't need a plugin for basic needs.
You can do this to get a hash of all validators.
ModelName.validators
If you want to get the validators for a specific field :
ModelName.validators_on(:attribute)