mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
set max length for domain
This commit is contained in:
parent
7c31d39919
commit
3eb904c882
@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
<h2 class="h4">New Domain</h2>
|
<h2 class="h4">New Domain</h2>
|
||||||
|
|
||||||
{{ new_custom_domain_form.domain(class="form-control", placeholder="my-domain.com") }}
|
{{ new_custom_domain_form.domain(class="form-control", placeholder="my-domain.com", maxlength=128) }}
|
||||||
{{ render_field_errors(new_custom_domain_form.domain) }}
|
{{ render_field_errors(new_custom_domain_form.domain) }}
|
||||||
<div class="small-text">Please use full path domain, for ex <em>my-subdomain.my-domain.com</em></div>
|
<div class="small-text">Please use full path domain, for ex <em>my-subdomain.my-domain.com</em></div>
|
||||||
|
|
||||||
|
@ -10,9 +10,10 @@ from app.extensions import db
|
|||||||
from app.models import CustomDomain
|
from app.models import CustomDomain
|
||||||
|
|
||||||
|
|
||||||
# todo: add more validation
|
|
||||||
class NewCustomDomainForm(FlaskForm):
|
class NewCustomDomainForm(FlaskForm):
|
||||||
domain = StringField("domain", validators=[validators.DataRequired()])
|
domain = StringField(
|
||||||
|
"domain", validators=[validators.DataRequired(), validators.Length(max=128)]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@dashboard_bp.route("/custom_domain", methods=["GET", "POST"])
|
@dashboard_bp.route("/custom_domain", methods=["GET", "POST"])
|
||||||
|
Loading…
Reference in New Issue
Block a user