in /validate function else part is added in pages.js