add feature for #3
Merge pull request #4 from icoxfog417/issue3

add feature for #3
change validation way from method to class
Merge pull request #5 from icoxfog417/issue3-delegatefix

change validation way from method to class