Appellant brought his petition for habeas corpus in the circuit court to test the legality of his detention under a judgment and sentence for contempt of court by a judge of the Juvenile and Domestic Relations Court of Dade County. The record reveals that petitioner was in custody under authority of an order of the last mentioned court entered January 6, 1960, which was a sentence for a contempt. This appeal is from an order of the Circuit Court quashing the writ and remanding the petitioner to the custody of the sheriff.
*25The points argtied here by the appellant do not question the legality of said order but attempt to reach alleged errors of substantive law and of procedure, in proceedings before the Judge of the Juvenile and Domestic Relations Court prior to the contempt proceedings. The remedy for these alleged errors, which do not affect the legality of appellant’s custody, was by appeal. See Clark v. State ex rel. Rubin, Fla.App.1960, 122 So.2d 807; State v. J. K., Fla.App. 1958, 104 So.2d 113.
Affirmed.
HORTON, C. J., and PEARSON and CARROLL, CHAS., JJ., concur.