Skip to content

Commit

Permalink
Allow spaces in user name. Refs blinksh#1798
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Aug 18, 2023
1 parent e6ae605 commit e874ac8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Settings/ViewControllers/BKHosts/HostView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,7 @@ struct HostView: View {
throw FormValidationError.general(
message: "HostName is required."
)
}

let cleanUser = _user.trimmingCharacters(in: .whitespacesAndNewlines)
if let _ = cleanUser.rangeOfCharacter(from: .whitespacesAndNewlines) {
throw FormValidationError.general(message: "Spaces are not permitted in the user name.")
}
}
}

private func _saveHost() {
Expand Down

0 comments on commit e874ac8

Please sign in to comment.