apply validation