pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 265 forks source link

Required field validation not working for Relationship field type #4744

Closed kpitermsw closed 6 years ago

kpitermsw commented 6 years ago

I have POD taxonomy1 with field 'aaa' Relationship type depended of taxonomy2. Field 'aaa' is required. There is no 'aaa' validation when I add/edit taxonomy1.

jimtrue commented 6 years ago

Please provide more details of your configuration. You can export your configuration using Pods Admin, Components, Migrate: Packages, Export and then upload the resulting JSON as a text file to this ticket.

kpitermsw commented 6 years ago

Taxonomy 'stantion' has field 'mline' (Relationship type, REQUIRED, depended on 'line' taxonomy). Selection Type is Single Select, Format is dropdown. There is no 'REQUIRED' validation for the 'mline' field when add taxonomy term.

{"meta":{"version":"2.7.1","build":1517738063},"pods":{"45":{"id":45,"name":"line","label":"Линии метро","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":{"line_color":{"id":47,"name":"line_color","label":"Цвет","description":"","help":"","class":"","type":"color","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","color_repeatable":"0"}},"show_in_menu":"1","label_singular":"Линия метро","public":"1","show_ui":"1","hierarchical":"0","rewrite":"1","rewrite_with_front":"0","rewrite_hierarchical":"0","capability_type":"default","capability_type_custom":"_","query_var":"1","sort":"1","built_in_post_types_custom_css":"0","built_in_post_types_customize_changeset":"0","built_in_post_types_oembed_cache":"0","built_in_post_types_page":"0","built_in_post_types_post":"0","built_in_post_types_attachment":"0","menu_location":"objects","show_in_nav_menus":"1","show_tagcloud":"0","show_tagcloud_in_edit":"0","show_in_quick_edit":"1","show_admin_column":"0","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_archive":"append","rest_enable":"0","read_all":"0","write_all":"0","menu_name":"Линии метро","built_in_post_types_arenda":"0"},"44":{"id":44,"name":"stantion","label":"Станции метро","description":"","type":"taxonomy","storage":"meta","object":"","alias":"","fields":{"mline":{"id":48,"name":"mline","label":"Линия","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"taxonomy","pick_val":"line","sister_id":"","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"list","pick_allow_add_new":"0","pick_taggable":"0","pick_show_icon":"0","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"1","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_orderby":"@title","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_groupby":""}},"show_in_menu":"1","label_singular":"Станция метро","public":"1","show_ui":"1","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_hierarchical":"0","capability_type":"default","capability_type_custom":"metro","query_var":"1","sort":"0","built_in_post_types_custom_css":"0","built_in_post_types_customize_changeset":"0","built_in_post_types_oembed_cache":"0","built_in_post_types_page":"0","built_in_post_types_post":"0","built_in_post_types_attachment":"0","menu_location":"objects","show_in_nav_menus":"0","show_tagcloud":"0","show_tagcloud_in_edit":"0","show_in_quick_edit":"1","show_admin_column":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_archive":"append","rest_enable":"0","read_all":"0","write_all":"0","menu_name":"Станции метро","built_in_post_types_arenda":"1"}}}

quasel commented 6 years ago

seems to work for me -

side note: We don't recommend using relationships to taxonomies unless you exactly know what you are doing! use the default WP way to assigne them!