fixed prototype#validate