That would depend completely on the local codes.
Most places no longer allow a sump pump to be connected to the sewer system as it causes the treatment plant to be deluged with groundwater. Sump pumps are for pumping groundwater away from the homes foundation. There is a basin/pump system available for laundry discharge which is similar to what is available for sewage. The local municipality building dept. would be the place to ask what is required.