allow alias to be 25 characters (instead of 16)
This commit is contained in:
parent
bc3098c9c8
commit
3ab610ff91
|
|
@ -48,7 +48,7 @@ func save_scale_settingsHandler(response http.ResponseWriter, request *http.Requ
|
|||
myalias := alias[0]
|
||||
|
||||
// validate alias
|
||||
match, _ := regexp.MatchString("^[a-zA-Z0-9 ]{1,16}$", myalias)
|
||||
match, _ := regexp.MatchString("^[a-zA-Z0-9 ]{1,25}$", myalias)
|
||||
if !(match) {
|
||||
log.Println("Url Param 'alias' is not valid")
|
||||
fmt.Fprintf(response, "{ \"rc\": 9, \"msg\": \"alias is not valid\" }")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<!-- Content ... -->
|
||||
<div class="field"> <label id="label" class="label">Bezeichnung</label>
|
||||
<div class="control has-icons-right">
|
||||
<input id="alias" class="input" type="text" maxlength="16">
|
||||
<input id="alias" class="input" type="text" maxlength="25">
|
||||
<span id="alias_exclamation" class="icon is-small is-right">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
</span>
|
||||
|
|
@ -199,7 +199,7 @@ Sie erhalten eine E-Mail, sobald die Zahlung erfolgreich abgeschlossen ist.
|
|||
|
||||
function validate(what, text) {
|
||||
if (what == 'alias') {
|
||||
var re = /^[a-zA-Z0-9 ]{1,16}$/;
|
||||
var re = /^[a-zA-Z0-9 ]{1,25}$/;
|
||||
} else if (what == 'smsnumber') {
|
||||
var re = /^\+[0-9]{11,11}$/;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue