app/models/nomenclatural_rank/icnp/species_group.rb
class NomenclaturalRank::Icnp::SpeciesGroup < NomenclaturalRank::Icnp
def self.validate_name_format(taxon_name)
taxon_name.errors.add(:name, 'name must be at least two letters') unless !taxon_name.name.blank? && taxon_name.name.length > 1
taxon_name.errors.add(:name, 'name must be lower case') if !taxon_name.name.blank? && taxon_name.name != taxon_name.name.downcase && !taxon_name.name.include?(' ')
end
def self.valid_parents
self.collect_descendants_to_s(
NomenclaturalRank::Icnp::GenusGroup,
NomenclaturalRank::Icnp::SpeciesGroup)
end
end