Answer the question
In order to leave comments, you need to log in
JSON object validation?
There is a POST request, it contains JSON, for example
{
"User": {
"name": "Name",
"lastName": "last name",
"email": "[email protected]",
}
}
public function rules()
{
return [
'User.name' => 'required|max:100',
'User.lastName' => 'required|max:100',
'User.email' => 'required|email|max:255|unique:users',
];
}
select count(*) as aggregate from "users" where "User"."emai" = ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question