From 29f570aa2ffdf9a487bb0ba6044791198dbf9a6d Mon Sep 17 00:00:00 2001 From: Priyanshi Gaur Date: Wed, 18 Sep 2024 23:27:00 +0530 Subject: [PATCH] make changes in pkg/views/login/create.go Signed-off-by: Priyanshi Gaur --- pkg/views/login/create.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkg/views/login/create.go b/pkg/views/login/create.go index 70e283ca..7a1065e4 100644 --- a/pkg/views/login/create.go +++ b/pkg/views/login/create.go @@ -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 == "" { @@ -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()