trim required values before checking
Merge pull request #5 from yields/master

trim required values before checking