forked from mirrors/pronouns.cc
fix: validate WordStatus correctly, raise field entry length limit to 100
This commit is contained in:
parent
96376516b0
commit
c98e4390b1
2 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ func (fe FieldEntry) Validate() string {
|
|||
return fmt.Sprintf("name must be %d characters or less, is %d", FieldEntryMaxLength, len([]rune(fe.Value)))
|
||||
}
|
||||
|
||||
if fe.Status.Valid() {
|
||||
if !fe.Status.Valid() {
|
||||
return "status is invalid"
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ func (p PronounEntry) Validate() string {
|
|||
return fmt.Sprintf("pronouns must be %d characters or less, is %d", FieldEntryMaxLength, len([]rune(p.Pronouns)))
|
||||
}
|
||||
|
||||
if p.Status.Valid() {
|
||||
if !p.Status.Valid() {
|
||||
return "status is invalid"
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ const (
|
|||
MaxFields = 25
|
||||
FieldNameMaxLength = 100
|
||||
FieldEntriesLimit = 100
|
||||
FieldEntryMaxLength = 50
|
||||
FieldEntryMaxLength = 100
|
||||
)
|
||||
|
||||
type Field struct {
|
||||
|
|
Loading…
Reference in a new issue