I recently upgraded to laravel 5.4 (from 5.2) to make use of the nullable validation rule.
I have a field act_post_code which can be either an integer OR null. So I provided the following rule in my Request class.
'act_post_code' => 'integer|nullable'
In Postman using form-data, I provide a key = act_post_code with its value = null.
The response I get is the following:
{
"act_post_code": [
"The act post code must be an integer."
]
}
act_post_codenullable in your table definition?act_post_codevarchar(4) DEFAULT NULL,