use $validate functions