Closed victorLessa closed 5 years ago
Is there any function String ()?
My code..
$name = v::string()->noWhitespace()->length(1, 10); $ageValidator = v::numeric()->positive()->between(1, 20); $date = v::numeric()->positive()->length(1, 8); $employee = v::numeric()->positive()->length(1, 1); $validators = array( 'first_name' => $name, 'last_name' => $name, 'date_Of_Birth' => $date, 'employee' => $employee, 'age' => $ageValidator ); $app->add(new \DavidePastore\Slim\Validation\Validation($validators));
Hi @VictorLessa . Yes, if you want to check if the given variable is a string, you can use the v::stringType validator. Let me know if you have additional related questions.
Is there any function String ()?
My code..