aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/spaccount.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/app/spaccount.go')
-rw-r--r--internal/app/spaccount.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/app/spaccount.go b/internal/app/spaccount.go
index 7da54366..c9f08fe9 100644
--- a/internal/app/spaccount.go
+++ b/internal/app/spaccount.go
@@ -6,6 +6,7 @@ import (
"syscall"
"hakurei.app/container/fhs"
+ "hakurei.app/internal/validate"
)
func init() { gob.Register(spAccountOp{}) }
@@ -21,7 +22,7 @@ func (s spAccountOp) toSystem(state *outcomeStateSys) error {
}
// default is applied in toContainer
- if state.Container.Username != "" && !isValidUsername(state.Container.Username) {
+ if state.Container.Username != "" && !validate.IsValidUsername(state.Container.Username) {
return newWithMessage(fmt.Sprintf("invalid user name %q", state.Container.Username))
}
return nil