Update validator.js

shrunk size by pulling overriding error message from each block