diff --git a/atst/forms/task_order.py b/atst/forms/task_order.py index 7d1c2167..7b5f42e4 100644 --- a/atst/forms/task_order.py +++ b/atst/forms/task_order.py @@ -31,7 +31,14 @@ class AppInfoForm(CacheableForm): portfolio_name = StringField( translate("forms.task_order.portfolio_name_label"), description=translate("forms.task_order.portfolio_name_description"), - validators=[Required()], + validators=[ + Required(), + Length( + min=4, + max=100, + message=translate("forms.portfolio.name_length_validation_message"), + ), + ], ) scope = TextAreaField( translate("forms.task_order.scope_label"), diff --git a/templates/task_orders/new/app_info.html b/templates/task_orders/new/app_info.html index 85b52a6c..a5cd23d7 100644 --- a/templates/task_orders/new/app_info.html +++ b/templates/task_orders/new/app_info.html @@ -13,7 +13,7 @@

{{ "task_orders.new.app_info.basic_info_title"| translate }}

-{{ TextInput(form.portfolio_name, placeholder="The name of your office or organization") }} +{{ TextInput(form.portfolio_name, placeholder="The name of your office or organization", validation="portfolioName") }} {{ TextInput(form.scope, paragraph=True) }}

{{ "task_orders.new.app_info.sample_scope" | translate | safe }}