validate key