implement func Validate