ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/components/region-form/region-form.schema.js

Summary

Maintainability
A
0 mins
Test Coverage
import { validatorTypes } from '@@ddf';

function createSchema(maxDescLen) {
  return {
    fields: [{
      component: 'text-field',
      name: 'description',
      id: 'description',
      maxLength: maxDescLen,
      label: __('Description'),
      validateOnMount: true,
      validate: [{
        type: validatorTypes.REQUIRED,
        message: __('Required'),
      }],
      autoFocus: true,
    }],
  };
}

export default createSchema;