I have patch_selector widget with required true option, but I can submit with empty field w/o choosing a file.
form:
- select_sim_file
select_sim_file:
widget: “path_selector”
required: true
required: true
directory: “/fs/home”
It’s what I see in the log file
App 4003 output: a-option-for-auto-accounts-satellites\"=>false}], [\"medprio_nolim\", \"medprio_nolim\", {\"data-option-for-cluster-amp\"=>false, \"data-option-for-cluster-phoenix\"=>false, \"data-option-for-auto-accounts-flamingo\"=>false, \"data-option-for-auto-accounts-satellites\"=>false}], [\"modelcheck\", \"modelcheck\", {\"data-option-for-cluster-amp\"=>false, \"data-option-for-cluster-phoenix\"=>false, \"data-option-for-auto-accounts-flamingo\"=>false, \"data-option-for-auto-accounts-satellites\"=>false}], [\"test\", \"test\", {\"data-option-for-cluster-amp\"=>false, \"data-option-for-cluster-phoenix\"=>false, \"data-option-for-auto-accounts-flamingo\"=>false, \"data-option-for-auto-accounts-satellites\"=>false}]], :value=>\"test\"}>, #<SmartAttributes::Attributes::BcNumSlots:0x00007f4ca4057ba0 @id=\"bc_num_slots\", @opts={:help=>\"This adds a number that describes the number of processors, CPUs on a single node, or nodes that the submitted job may use\", :value=>\"1\"}>, #<SmartAttributes::Attributes::BcNumHours:0x00007f4ca4057560 @id=\"bc_num_hours\", @opts={:min=>1, :step=>1, :value=>\"1\"}>, #<SmartAttributes::Attribute:0x00007f4ca4056f98 @id=\"select_sim_file\", @opts={:widget=>\"path_selector\", :directory=>\"/fs/home\"}>, #<SmartAttributes::Attribute:0x00007f4ca4056d68 @id=\"select_initial_file\", @opts={:widget=>\"path_selector\", :directory=>\"/fs/cluster/data\", :value=>\"\"}>, #<SmartAttributes::Attribute:0x00007f4ca4056638 @id=\"select_macro_file\", @opts={:widget=>\"path_selector\", :directory=>\"/fs/cluster/data\", :value=>\"\"}>, #<SmartAttributes::Attributes::BcEmailOnStarted:0x00007f4ca4056098 @id=\"bc_email_on_started\", @opts={:value=>\"0\"}>], @app_specific_cache_setting=nil, @errors=#<ActiveModel::Errors:0x00007f4ca1571120 @base=#<BatchConnect::SessionContext:0x00007f4ca45b7c80 ...>, @errors=[]>>, @object_name=\"batch_connect_session_context\", @default_options={}, @default_html_options={}, @multipart=nil, @index=nil>\n\n form.send widget, attrib.id, all_options\n ^^^^^\nDid you mean? text_field):\n 3: \n 4: <%= bootstrap_form_for(@session_context) do |f| %>\n 5: <% f.object.each do |attrib| %>\n 6: <%= create_widget(f, attrib, format: @render_format) %>\n 7: <% end %>\n 8: \n 9: <%- if Configuration.bc_saved_settings? -%>\n \napp/helpers/batch_connect/session_contexts_helper.rb:39:in
create_widget’\napp/views/batch_connect/session_contexts/_form.html.erb:6\napp/models/batch_connect/session_context.rb:43:in each'\napp/models/batch_connect/session_context.rb:43:in
each’\napp/views/batch_connect/session_contexts/_form.html.erb:5\napp/views/batch_connect/session_contexts/_form.html.erb:4\napp/views/batch_connect/session_contexts/new.html.erb:86"`
Any help appreciated.