use \A \z instead of ^ $ for validation
Merge pull request #31 from flyerhzm/rails-4

use \A \z instead of ^ $ for validation