Fixes #4519, #9531 - Correctly handle invalid host name changes
Removing a host name or otherwise changing it to an invalid name (such as a name containing /) caused the form to fail loading. This makes sure all paths are generated correctly and validation error is shown. (cherry picked from commit adc931f2107eaf14f095193a03ebad6dc10e4d22)
Related issues
Bug #4519: Renaming host with / in name causes "No route matches" error
Bug #9531: Removing host name from Host#edit throws routing error
Fixes #4519, #9531 - Correctly handle invalid host name changes
Removing a host name or otherwise changing it to an invalid name (such
as a name containing /) caused the form to fail loading. This makes sure
all paths are generated correctly and validation error is shown.
(cherry picked from commit adc931f2107eaf14f095193a03ebad6dc10e4d22)