protected function normalize(array $input) : array
    {
        $normalized = [];
        foreach ($this->rules() as $field => $value) {
            $normalized[$field] = $input[$field] ?? '';
        }
        return $normalized;
    }
protected function normalize(array $input) : array
    {
        $normalized = [];
        foreach ($this->rules() as $field => $value) {
            $normalized[$field] = $input[$field] ?? '';
        }
        return $normalized;
    }
protected function normalize ( array $ input ) : array { $ normalized = [ ] ; foreach ( $ this -> rules ( ) as $ field => $ value ) { $ normalized [ $ field ] = $ input [ $ field ] ?? '' ; } return $ normalized ; }
Remove unexpected fields and ensure all fields in rules array are present
@param $input
@return array
Remove unexpected fields and ensure all fields in rules array are present