Prevent creating new fields with dots in their name

This commit is contained in:
Jože Fortun
2024-09-23 11:31:58 +02:00
parent cd6bf89e26
commit 08787130b8
3 changed files with 3 additions and 3 deletions
@@ -1,7 +1,6 @@
<template>
<tr>
<td
v-b-tooltip.noninteractive.hover
class="handle align-middle pr-2"
>
<font-awesome-icon
@@ -15,6 +14,7 @@
>
<b-form-input
v-model="value.name"
v-b-tooltip.noninteractive.hover="{ title: nameState === false ? $t('module:edit.tooltip.name') : '', placement: 'right', container: '#body' }"
required
:readonly="hasData"
:state="nameState"
@@ -2,7 +2,7 @@ import { merge } from 'lodash'
import { IsOf } from '../../../guards'
import { Apply, CortezaID, NoID } from '../../../cast'
export const FieldNameValidator = /^[A-Za-z][0-9A-Za-z_\-.]*[A-Za-z0-9]$/
export const FieldNameValidator = /^[A-Za-z][0-9A-Za-z_-]*[A-Za-z0-9]$/
const unsortableFieldKinds = ['File', 'Geometry']
const unsortableSysFields = ['recordID']
+1 -1
View File
@@ -74,7 +74,7 @@ edit:
systemFields: 'System fields:'
tooltip:
attributes: Select if the field can hold multiple values, if it's required field or if contains sensitive data
name: Should be at least 2 characters long. Can contain only letters, numbers, underscores and dots. Must end with letter or number
name: Should be at least 2 characters long. Can contain only letters, numbers, underscores and dashes. Must end with letter or number.
private: Sensitive data
required: Required field
title: The name displayed in form input / data lists