Ok! I think you may want to use a super model to make some inheritance, because injection in active record base can be dangerous for yourself, so if you have a super model that descends from ActiveRecord base with that validation and after that, you create other models that descend this one you'll have that validation to all of them without needing to wright the validation again.
class SuperModel < ActiveRecord::Base
#This if for avoid single table inheritance
self.abstract_class = true
#-------------------------------------------------------------------------------
before_validation :clean
end
class Example < SuperModel
#this will have the before_validation :clean
end