All incorporated cities, towns, and villages, however formed, are empowered to regulate the business of electricians and electrical work in such cities, towns, or villages, and to enforce efficiency of same, and to that end to pass all ordinances necessary to carry out and enforce the powers delegated.