The electromagnetic generated by the energization should interact with the strong magnetic field. Therefore, the positive and negative poles of the electromagnetic should be recognized. If the connection is reversed, the solenoid valve cannot work.
eBay