bootstrap validtaion for dot attribute in spring boot with JavaScript

45 views Asked by At

how to use a composite primary attribute for bootstrap validation which have a dot in attribute name like pk.name as a name for input field.

      fields: {
  pk.name: {
      selector: '#key',
      validators: {
          notEmpty: {
              message: 'The title is required and cannot be empty'
          }
      }
  },

it does not accept the field name with dot instead it can accept but not validate properly.

1

There are 1 answers

1
Juorder Gonzalez On

You should try using "" to wrap the attribute name like this.

"pk.name": {...}