Wrap the validator logic into a function, assign it into an object with key is 'default', so it would be able to use in ES6 module loader system