diff --git a/app/javascript/submission_form/date_step.vue b/app/javascript/submission_form/date_step.vue
index 034022e8..ecfd1be3 100644
--- a/app/javascript/submission_form/date_step.vue
+++ b/app/javascript/submission_form/date_step.vue
@@ -14,7 +14,9 @@
/>
{{ field.name && showFieldNames ? field.name : t('date') }}
- ({{ t('optional') }})
+
+ ({{ t('optional') }})
+
{{ field.name }}
- ({{ t('optional') }})
+
+ ({{ t('optional') }})
+
{{ showFieldNames && field.name ? field.name : t('verified_phone_number') }}
- ({{ t('optional') }})
+
+ ({{ t('optional') }})
+
{{ field.name }}
- ({{ t('optional') }})
+
+ ({{ t('optional') }})
+
+
+
+
+
+
+
+
+
{
return this.schemaAttachmentsIndexes[a.attachment_uuid] - this.schemaAttachmentsIndexes[b.attachment_uuid]
@@ -400,6 +471,20 @@ export default {
}
},
methods: {
+ onChangeValidation (event) {
+ if (event.target.value === 'custom') {
+ this.field.validation = { pattern: '' }
+
+ this.$nextTick(() => this.$refs.validationCustom.focus())
+ } else if (event.target.value) {
+ this.field.validation ||= {}
+ this.field.validation.pattern = event.target.value
+ } else {
+ delete this.field.validation
+ }
+
+ this.save()
+ },
copyToAllPages (field) {
const areaString = JSON.stringify(field.areas[0])
diff --git a/app/javascript/template_builder/i18n.js b/app/javascript/template_builder/i18n.js
index 9372b711..a2af0b8c 100644
--- a/app/javascript/template_builder/i18n.js
+++ b/app/javascript/template_builder/i18n.js
@@ -6,6 +6,7 @@ const en = {
align: 'Align',
add_all_required_fields_to_continue: 'Add all required fields to continue',
left: 'Left',
+ validation: 'Validation',
right: 'Right',
center: 'Center',
description: 'Description',
@@ -100,7 +101,17 @@ const en = {
draw_field: 'Draw {field} Field',
replace: 'Replace',
uploading_: 'Uploading...',
- add_document: 'Add Document'
+ add_document: 'Add Document',
+ none: 'None',
+ ssn: 'SSN',
+ ein: 'EIN',
+ email: 'Email',
+ url: 'URL',
+ zip: 'ZIP',
+ custom: 'Custom',
+ numbers_only: 'Numbers only',
+ letters_only: 'Letters only',
+ regexp_validation: 'Regexp validation'
}
export { en }