- MODX Revolution 2.8.5-pl
- MIGX 3.0.2-beta1
Under my current configuration there is a database field named introtext with precision 255.
<field key="introtext" dbtype="varchar" precision="255" phptype="string" null="false" default="" />
When entering data via a MIGX CMP the following error presents in a popup lightwindow quip.thread_err_save
.
The MODX Error Log clearly shows this is because the data entered is longer than 255 characters.
Data too long for column 'introtext' at row 1
Can anyone advise how to configure MIGX to alert the user to the length error as MODX would do for a TV of the same type?
I tried setting the Configs value for the introtext field to {"maxLength":"255"}
but this has no effect.
On the Docs for TV Input Types there are notes for all input option names (for use in migx options-json) eg.
{
"allowBlank": "true",
"maxLength": "",
"minLength": "",
"regex": "",
"regexText": ""
}
But I don’t see a field named options-json
in the MIGX config. What did I miss?
MIGX config is below
{
"formtabs":[
{
"MIGX_id":8,
"caption":"Review caption",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":32,
"field":"title",
"caption":"title",
"pos":1
},
{
"MIGX_id":33,
"field":"introtext",
"caption":"introtext",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"textarea",
"validation":"",
"configs":{
"maxLength":155
},
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":2
},
{
"MIGX_id":34,
"field":"customer_name",
"caption":"customer_name",
"pos":3
}
],
"pos":1
}
],
"contextmenus":"update||duplicate||remove",
"actionbuttons":"addItem",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"",
"disable_add_item":"",
"add_items_directly":1,
"formcaption":"VenueReviewItem form caption",
"update_win_title":"VenueReviewItem window title",
"win_id":"VenueReviewItem",
"maxRecords":"",
"addNewItemAt":"top",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"this.handleColumnSwitch||this.publishObject||this.unpublishObject",
"filtersperrow":4,
"packageName":"venue",
"classname":"VenueReviewItem",
"task":"",
"getlistsort":"pos",
"getlistsortdir":"asc",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"dragdrop",
"gridload_mode":2,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"VenueReviewGroup",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"VenueReviewItem main caption",
"cmptabcaption":"VenueReviewItem tab caption",
"cmptabdescription":"VenueReviewItem tab description",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"MIGX_id":6,
"header":"id",
"dataIndex":"id",
"width":15,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"title",
"dataIndex":"title",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":3,
"header":"introtext",
"dataIndex":"introtext",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":4,
"header":"customer_name",
"dataIndex":"customer_name",
"width":"",
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":"this.textEditor"
},
{
"MIGX_id":5,
"header":"published",
"dataIndex":"published",
"width":25,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderClickCrossTick",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
}
],
"category":""
}