Pretty sure with big company like JYP they Will have lawyer from both side present at the contract signing.
And if it's illegal the why would alot of GG member talking about it .
And it's a company we're talking about, and they've in the industry for years,
And let's not forget about loopholes where they wont stated it openly on the contract , maybe smth Along the line "Will not do something that Will cause damage the group image/value"
Yes they could argue there's nothing about Dating in court, but the company can also argue that what she/he did is in fact did damage the group image/value"
And lastly it Seems like people getting me wrong . What i write is not my personal opinion but just pointing something out.
In my personal opinion , i don't really care , people date all the time