module Doorkeeper::Validations
def valid?
def valid? validate @error.nil? end
def validate
def validate @error = nil self.class.validations.each do |validation| break if @error @error = validation.last unless send("validate_#{validation.first}") end end