Merge pull request #1 from aralejs/master

merge master
fixed #43 required rule bug
add cases
Merge pull request #52 from lianqin7/master

fixed #43 required & rule bug