The legality of administrative decisions taken pursuant to Chapters II to IV of this Title may only be challenged before a court of law.
The juge des libertés et de la détention shall hear the challenges referred to in the first paragraph of this article in the context of proceedings brought pursuant to articles L. 3211-12 and L. 3211-12-1. In this case, any irregularity affecting an administrative decision referred to in the first paragraph of this article shall only result in the measure being lifted if this has adversely affected the rights of the person who was the subject of the decision.
When the judicial court rules on claims for compensation for the harmful consequences resulting for the person concerned from the administrative decisions referred to in the first paragraph, it may, for this purpose, examine any irregularities in these decisions.