diff --git a/app/models/object_manager/attribute.rb b/app/models/object_manager/attribute.rb index 745554f45..5ed09f906 100644 --- a/app/models/object_manager/attribute.rb +++ b/app/models/object_manager/attribute.rb @@ -769,8 +769,8 @@ to send no browser reload event, pass false # validate data_option if data_type == 'input' - raise 'Need data_option[:type] param' if !data_option[:type] - raise "Invalid data_option[:type] param '#{data_option[:type]}'" if data_option[:type] !~ /^(text|password|tel|fax|email|url)$/ + raise 'Need data_option[:type] param e. g. (text|password|tel|fax|email|url)' if !data_option[:type] + raise "Invalid data_option[:type] param '#{data_option[:type]}' (text|password|tel|fax|email|url)" if data_option[:type] !~ /^(text|password|tel|fax|email|url)$/ raise 'Need data_option[:maxlength] param' if !data_option[:maxlength] raise "Invalid data_option[:maxlength] param #{data_option[:maxlength]}" if data_option[:maxlength].to_s !~ /^\d+?$/ end