Planck intermediate results: XLIX. Parity-violation constraints from polarization data