You can validate input with using validateand passattributes for CKTextField and CKText. If the input pass validation, variable for passattribute is true, or false.
validate
pass
false