Fix validate.js (check validation)