In a RESTful app, in a POST request, with a rule like
public function rules()
{
return [
['attributeX', 'required'],
];
}
A POST request with body parameteres like
{}
Would throw a "attributeX required" error
But in a PUT request, It would not.
According to documentation.
This validator checks if the input value is provided and not empty.
By default, an input is considered empty if its value is an empty string, an empty array or a null
In the same PUT request with body parameteres like
{}
Wouldn’t $_POST[‘attributeX’]; be null?