valiate.js modified for final check