fix validate when value undefined
Merge pull request #24 from benjamine/master

fix validate when value undefined