feat: allow upper case "umlaute"
This commit was merged in pull request #109.
This commit is contained in:
@@ -2,7 +2,6 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
|
||||||
|
|
||||||
"spend-sparrow/db"
|
"spend-sparrow/db"
|
||||||
"spend-sparrow/log"
|
"spend-sparrow/log"
|
||||||
@@ -15,8 +14,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
safeInputRegex = regexp.MustCompile(`^[a-zA-Z0-9äöüß -]+$`)
|
|
||||||
|
|
||||||
accountMetric = promauto.NewCounterVec(
|
accountMetric = promauto.NewCounterVec(
|
||||||
prometheus.CounterOpts{
|
prometheus.CounterOpts{
|
||||||
Name: "spendsparrow_account_total",
|
Name: "spendsparrow_account_total",
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"regexp"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
safeInputRegex = regexp.MustCompile(`^[a-zA-Z0-9ÄÖÜäöüß -]+$`)
|
||||||
|
)
|
||||||
|
|
||||||
func validateString(value string, fieldName string) error {
|
func validateString(value string, fieldName string) error {
|
||||||
if value == "" {
|
if value == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user