Update validation.rb

Implementation based on /lib/adapters/git/validation.rb