diff --git a/Passepartout/App/Constants/Theme.swift b/Passepartout/App/Constants/Theme.swift index d71a34ac..403f7fe8 100644 --- a/Passepartout/App/Constants/Theme.swift +++ b/Passepartout/App/Constants/Theme.swift @@ -401,6 +401,11 @@ extension View { // MARK: Validation extension View { + func themeProfileName() -> some View { + autocapitalization(.none) + .disableAutocorrection(true) + } + func themeURL(_ urlString: String?) -> some View { themeValidating(urlString, validator: Validators.url) .keyboardType(.asciiCapable) diff --git a/Passepartout/App/Views/AddProfileView.swift b/Passepartout/App/Views/AddProfileView.swift index bc7d32e4..093769a2 100644 --- a/Passepartout/App/Views/AddProfileView.swift +++ b/Passepartout/App/Views/AddProfileView.swift @@ -44,6 +44,7 @@ enum AddProfileView { footer: themeErrorMessage(errorMessage) ) { TextField(L10n.Global.Placeholders.profileName, text: $profileName, onCommit: onCommit) + .themeProfileName() } } } diff --git a/Passepartout/App/Views/ProfileView+Rename.swift b/Passepartout/App/Views/ProfileView+Rename.swift index cae3139c..584ac854 100644 --- a/Passepartout/App/Views/ProfileView+Rename.swift +++ b/Passepartout/App/Views/ProfileView+Rename.swift @@ -49,7 +49,7 @@ extension ProfileView { header: Text(L10n.Profile.Alerts.Rename.title) ) { TextField(L10n.Global.Placeholders.profileName, text: $newName, onCommit: commitRenaming) - .disableAutocorrection(true) + .themeProfileName() .onAppear(perform: loadCurrentName) } }.themeSecondaryView()