['required', 'string'], // Zero is legitimate — it is how "the whole forum" is stored, since // it has no row of its own to point at. AtLeastRule, because // wp-validator's own `min:0` rejects 0. 'target_id' => ['required', 'integer', new AtLeastRule(0)], 'follow' => ['required', 'boolean'], ]; } public function messages() { return [ 'target_type.required' => __('What is being followed is missing.', 'bit-connect'), 'target_id.required' => __('What is being followed is missing.', 'bit-connect'), ]; } }