I recently ran in the problem that a client wanted an application form which is easy peasy built with Gravity forms.
They also wanted to ensure that at least 3 previous jobs are filled out. The previoius employers field was a list field (Name, Address, Time worke there etc.)
If you ever need to enforce a minumum amount of list items use the Gravity Form field validation :
add_filter( 'gform_field_validation_1_27', 'force_three_rows_in_lists', 10, 4 );
function force_three_rows_in_lists($result, $value, $form, $field){
if ( $result['is_valid'] && count($value) < 3) {
$result['is_valid'] = false;
$result['message'] = 'Please enter at least 3 previous employers (Use the + Button at the end to add more lines)';
}
return $result;
}
The count($value)< 3 is the important part, the $value is an array of rows that are submitted.
More Info about that filter in the Gravity Froms Documentation.