app/javascript/components/region-form/region-form.schema.js
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;