Jump to content

Getting 'field is required' message when field has been filled in

validation SET

  • Please log in to reply
2 replies to this topic

#1 vardas



  • Members
  • Pip
  • 8 posts

Posted 13 July 2015 - 03:55 PM

I am getting the warning message '...field is required' for SET fields even when an item has been selected for the SET.

The validation of all of the other field types works fine it is just SET fields that do not get validated properly.


Is there a way around this?

#2 Paul Savostin

Paul Savostin

    Advanced Member

  • Members
  • PipPipPip
  • 229 posts
  • LocationUkraine

Posted 13 July 2015 - 08:23 PM

Hi! Try to use  more advanced question with example screenshots if you need any help.

#3 Json Sean

Json Sean


  • Members
  • Pip
  • 9 posts

Posted 14 September 2017 - 08:49 AM

You may solve  it by https://www.groceryc...157/#entry15517


Modify file of 'system/libraries/Form_validation.php':


in the function "public function run($group '')",before _execute action add codes like this:




if(in_array('required',$row['rules']) and is_array($row['postdata'])){
$row['postdata'] = json_encode($row['postdata'],JSON_UNESCAPED_UNICODE);


$this->_execute($row$row['rules'], $row['postdata']);


Also tagged with one or more of these keywords: validation, SET

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users