mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #10581 from AlexSCorey/10544-fix
Prevents submission of jtform if name is > 512 characters SUMMARY This addresses #10544 by adding a maxLength validator to the name field on the Job Template form ISSUE TYPE Bugfix Pull Request COMPONENT NAME UI AWX VERSION ADDITIONAL INFORMATION Reviewed-by: Kersom <None> Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
This commit is contained in:
commit
4eca133080
@ -30,7 +30,7 @@ import {
|
||||
SubFormLayout,
|
||||
} from '../../../components/FormLayout';
|
||||
import { VariablesField } from '../../../components/CodeEditor';
|
||||
import { required } from '../../../util/validators';
|
||||
import { required, combine, maxLength } from '../../../util/validators';
|
||||
import { JobTemplate } from '../../../types';
|
||||
import {
|
||||
InventoryLookup,
|
||||
@ -239,7 +239,7 @@ function JobTemplateForm({
|
||||
name="name"
|
||||
type="text"
|
||||
label={t`Name`}
|
||||
validate={required(null)}
|
||||
validate={combine([required(null), maxLength(512)])}
|
||||
isRequired
|
||||
/>
|
||||
<FormField
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user