Skip to content

Commit

Permalink
make changes in pkg/views/login/create.go
Browse files Browse the repository at this point in the history
Signed-off-by: Priyanshi Gaur <noxdot1134@gmail.com>
  • Loading branch information
nox1134 committed Sep 18, 2024
1 parent 58b251f commit 29f570a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/views/login/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func CreateView(loginView *LoginView) {
}),
huh.NewInput().
Title("Password").
EchoMode(huh.EchoModePassword).
EchoMode(huh.EchoModePassword).
Value(&loginView.Password).
Validate(func(str string) error {
if str == "" {
Expand All @@ -48,13 +48,7 @@ func CreateView(loginView *LoginView) {
}),
huh.NewInput().
Title("Name of Credential").
Value(&loginView.Name).
Validate(func(str string) error {
if str == "" {
return errors.New("credential name cannot be empty")
}
return nil
}),
Value(&loginView.Name),
),
).WithTheme(theme).Run()

Expand Down

0 comments on commit 29f570a

Please sign in to comment.