Ask a Business Lawyer. Get Business Law Questions Answered ASAP.
Yes, it's against the building code and also against the health and safety code.
Have you contacted the builder? If so, what was their response?
Have you contacted the building inspector?
Did you buy the house new?
It's against the building code NOT to install a trap in a bath tub. The necessity is to prevent sewer gases (all the gases that can potentially be in the sewer system and are in the sewer system) from entering the home by the use of standing water.
So, if you can testify that you did no repair work and there isn't a trap - then the builder must have failed to install such - a violation of the building code.