Appellant, a member of the Sikh religion, sued the Army for refusing, to process his enlistment application because he could not comply with Army appearance regulations. The district court dismissed the suit for lack of subject matter jurisdiction on the ground that such regulations are not subject to judicial review. Appellant contends *1412that the regulations are reviewable, that they were amended in violation of the Administrative Procedure Act, and that they violated his First and Fifth Amendment rights. We affirm.
I
FACTS
Practicing Sikhs must wear unshorn head and facial hair and iron bracelets, and are strongly encouraged to wear turbans. Army Regulation 670-1 requires soldiers to cut their hair, shave, and wear only specified types of jewelry and headgear. From 1958 to 1974, the Army exempted conscripted Sikhs from these regulations. In 1974, the Army expanded the exemption to cover enlisted Sikhs.
In the late 1970’s, the Army received requests from other groups for similar exemptions. It reviewed the problem and concluded that allowing exemptions for numerous groups would adversely affect the Army’s discipline, morale, esprit de corps, and public image. The Army also evaluated the impact of beards and long hair on the effectiveness of gas masks, and concluded that they impair the ability of U.S. troops to survive chemical attacks by aggressor forces. The Army therefore amended its appearance regulations in 1981 to eliminate the blanket exemption for Sikhs. It apparently retained procedures for granting individual exemptions based on case by case evaluations of need. Neither the original appearance regulations nor the amendments were published in the Federal Register. The amendments did not apply to the approximately 15 Sikhs then on active duty.
In November 1982, appellant Guru Sant Singh Khalsa, a Sikh, attempted to enlist. The Army refused to process his application. Appellant then met with Colonel Hunt, an attorney with the Army Recruiting Command. Appellant informed Hunt that although he still wanted to enlist, he could not obey the Army’s appearance regulations. Hunt replied that Khalsa could not enlist because he would be unable to take the statutory enlistment oath promising to obey orders. See 10 U.S.C. § 502. Appellant’s request for an individual exemption was denied.
Appellant sued the Army, alleging violations of the Administrative Procedure Act and his First and Fifth Amendment rights. The Army moved to dismiss or, in the alternative, for summary judgment. Appellant responded in part by requesting more time to complete discovery. The district judge dismissed the case for lack of subject matter jurisdiction after concluding that the Army’s appearance regulations are not subject to judicial review. Khalsa appeals.
II
ANALYSIS
A. REVIEWABILITY OF CLAIMS
Appellant contends that the district court applied the wrong legal standard in determining reviewability, that it erred in defining and weighing the various factors that determine such reviewability, and that it improperly decided the issue without allowing appellant adequate time to complete discovery.
1. Standard of Review
The extent to which military regulations and decisions are subject to judicial review is a question of subject matter jurisdiction. See Schlanger v. United States, 586 F.2d 667, 670 (9th Cir.1978), cert. denied, 441 U.S. 943, 99 S.Ct. 2161, 60 L.Ed.2d 1045 (1979); Arnheiter v. Chafee, 435 F.2d 691, 692 (9th Cir.1970) (affirming dismissal for lack of jurisdiction because “the Navy’s actions were internal, administrative matters involving the judgment of Naval Command”). This court reviews de novo a district court’s decision on subject matter jurisdiction. Carpenters Southern Calif. Admin. Corp. v. Majestic Housing, 743 F.2d 1341,1343 (9th Cir.1984); Clayton v. Republic Airlines, Inc., 716 F.2d 729, 739 (9th Cir.1983).
2. Applicable Test for Reviewability
Appellant contends that the district court applied the wrong legal test in deciding the reviewability of his claims. Since the Su-
*1413preme Court has not spoken on this issue, the court applied the test first established in Mindes v. Seaman, 453 F.2d 197 (5th Cir.1971). The Mindes test has been adopted by seven other federal circuits, including ours. Note, Judicial Review of Constitutional Claims Against the Military, 84 Col.L.Rev. 387, 397, 402 (1984) (noting that eight circuits have adopted the Mindes test, and that the Third and District of Columbia Circuits have not followed it); Wallace v. Chappell, 661 F.2d 729 (9th Cir.1982), rev’d on other grounds, 462 U.S. 296,103 S.Ct. 2362, 76 L.Ed.2d 586 (1983) (expressly adopting the Mindes test); Gonzales v. Department of the Army, 718 F.2d 926, 929-30 (9th Cir.1983) (applying Mindes test). Appellant claims that the Mindes test is not applicable to this case for several reasons.
a. Internal Decisions
First, appellant claims that the Mindes test only determines the reviewability of “internal” military decisions, and that the Army appearance regulations are not “internal” in scope because they effectively prevent certain civilians from enlisting. We need not decide whether the supposed dichotomy between “internal” and “non-internal” regulations controls the choice of test. Even if it does, Army appearance regulations are “internal” for two reasons.
First, all three cases from Mindes circuits deciding the reviewability of enlistment regulations have applied the Mindes test to find such regulations nonreviewable. See Lindenau v. Alexander, 663 F.2d 68 (10th Cir.1981); West v. Brown, 558 F.2d 757 (5th Cir.1977), cert. denied, 435 U.S. 926, 98 S.Ct. 1493, 55 L.Ed.2d 520 (1978); Henson v. Alexander, 478 F.Supp. 1055 (W.D.Ark.1979). If, as in the three cited decisions, regulations expressly and directly prohibiting the enlistment of certain classes of civilians are “internal” for Mindes purposes, regulations that affect civilians only by indirectly preventing them from enlisting cannot be considered less “internal” for that purpose.
Second, if regulations governing soldiers’ appearance are not “internal,” then no Army regulations are “internal.” Almost any regulation may cause a particularly sensitive civilian to decide that he or she could not take the statutory enlistment oath to follow all orders.
We hold that Army appearance regulations are “internal.”
b. Conflict with Recent Cases
Second, appellant asserts that Rostker v. Goldberg, 453 U.S. 57, 101 S.Ct. 2646, 69 L.Ed.2d 478 (1981), and Callahan v. Woods, 736 F.2d 1269 (9th Cir.1984), require a judicial determination that the military properly exercised its discretion in making the regulations. According to appellant, the proper exercise of discretion involves giving reasoned consideration to the need for such regulations and the possibility of making exceptions, and considering alternative methods of serving legitimate state interests in a way that minimizes the burden on the free exercise of religion. It is unclear how these requirements would fit into the Mindes framework.1
*1414Rostker upheld a federal statute that forced men but not women to register for possible conscription. Since Rostker involved a congressional statute rather than a military action, regulation or decision, the power of the federal courts to review the challenged rule was not even addressed by the Court. See Marbury v. Madison, 1 Cranch (5 U.S.) 137, 2 L.Ed. 60 (1803). Moreover, Rostker was decided before the Ninth Circuit adopted the Mindes test in Wallace v. Chappell, and neither that case nor more recent authorities have referred to Rostker as altering or adding to the Mindes test. See, e.g., Gonzales v. Department of the Army, supra; Note, Judicial Review of Constitutional Claims Against the Military, 84 Col.L.Rev. 387 (1984).
Similarly, Callahan was an appeal from a summary judgment upholding a non-military regulation requiring the use of social security numbers to receive public assistance. The plaintiff objected to the rule because his religious beliefs forbade him from being identified by number. The reviewability of the regulation was never in question. To the extent that the Callahan court’s insistence on weighing the costs of exempting certain individuals from compliance with the regulation may be relevant to the merits here, there is another case more directly on point that will be discussed later in this opinion.
We hold that Rostker and Callahan do not alter this circuit’s test for the reviewability of military regulations.
c. Factual Determinations
Third, appellant claims that the district court had to decide various disputed factual matters in applying the Mindes test. A careful reading of the court’s order, however, reveals that it did not rely on disputed facts, but only cited the Army’s conclusions on the kinds of military judgments that courts have consistently refused to review. The Tenth Circuit, for example, declined to second-guess the military’s decision to restrict the enlistment of single mothers, stating:
It is clear from Major General Williams’ affidavit that the Army has experimented in this area and this regulation is what the Army concluded is necessary for the best interest of the armed forces. We agree that “our review would entail a sizeable leap into an area in which the only compass is accumulated military experience.” West v. Brown, 558 F.2d at 761.
Lindenau v. Alexander, 663 F.2d at 74.
Moreover, the fact that the Mindes test requires courts to make a preliminary assessment of the strength of a claim without the benefit of a full trial has led to some criticism of the test. See, e.g., Dillard v. Brown, 652 F.2d 316, 323 (3d Cir.1981) (declining to adopt the Mindes test for this reason); Note, Judicial Review of Constitutional Claims Against the Military, supra; Note, Federal Judicial Review of Military Administrative Decisions, 51 Geo.Wash.L.Rev. 612 (1983). There is no authority from any Mindes circuit, however, for refusing to apply the test on that ground. See Nieszner v. Mark, 684 F.2d 562, 564 (8th Cir.1982) (“We do not agree with the Third Circuit’s conclusion that the Mindes analysis requires the court to consider the merits of a case in making a threshold determination of reviewability”), cert. denied, 460 U.S. 1022, 103 S.Ct. 1273, 75 L.Ed.2d 494 (1983).
*1415We hold that the district court did not improperly consider disputed facts in deciding that military appearance regulations are nonreviewable. We also hold that the Mindes test is the proper standard for determining the reviewability of the Army’s appearance regulations.
3. Reviewability of Army Appearance Regulations Under Mindes
Appellant claims that the district judge erred in defining and weighing the Mindes factors. As modified by the Ninth Circuit, the Mindes test declares that
an internal military decision is unreviewable unless the plaintiff alleges (a) a violation of [a recognized constitutional right], a federal statute, or military regulations; and (b) exhaustion of available intraservice remedies. If the plaintiff meets both prerequisites, the trial court must weigh four factors to determine whether review should be granted:
(1) The nature and strength of the plaintiffs claim____
(2) The potential injury to the plaintiff if review is refused.
(3) The extent of interference with military functions.
(4) The extent to which military discretion or expertise is involved.
Wallace v. Chappell, 661 F.2d at 732-33 (emphasis in original).
The trial court acknowledged that appellant met the requirements of the first prong of the Mindes test by alleging a violation of his constitutional rights and exhausting all intraservice remedies. The four factors of the second prong will be considered in more detail below.
a. Nature and Strength of Claims
The district court cursorily noted that “appellant alleges recognized constitutional claims of the type that may be reviewed,” but concluded that the other three factors “militate strongly against reviewability.” Appellant correctly points out that the court should also have weighed the strength of his claim. He implies that the court failed to do so to avoid making factual determinations, which he alleges are inappropriate on a motion to dismiss or for summary judgment, and that if the court had reached the issue it would have found that appellant • had a very strong claim. These arguments are unpersuasive. If the district court had considered the strength of appellant’s claims it would have concluded, without having to make any factual determinations, that appellant’s claims were not strong.
In Mindes, the court noted that “Constitutional claims, normally more important than those having only a statutory or regulatory base, are themselves unequal in the whole scale of values — compare haircut regulation questions to those arising in court-martial situations which raise issues of personal liberty.” 453 F.2d at 201. See also Wallace v. Chappell, 661 F.2d at 733 (citing this portion of Mindes). Appellant’s claims are therefore on the least significant end of the constitutional scale.
More importantly, even if the district court had reached the merits, appellant would have lost. In Sherwood v. Brown, 619 F.2d 47 (9th Cir.), cert. denied, 449 U.S. 919, 101 S.Ct. 317, 66 L.Ed.2d 147 (1980), this court considered the constitutionality of the Navy’s discharge of a Sikh who refused to replace his turban with a helmet. The panel applied the highest possible level of scrutiny. It concluded that the Navy’s interest in the safety of its sailors around naval machinery and in combat constituted a compelling state interest, and that requiring all naval personnel to wear helmets was the least restrictive alternative. Id. at 48.
If the district court erred at all in applying the first Mindes factor, it erred by failing to expressly recognize the weakness of appellant’s claims.
b. Potential Injury to Appellant
The district court found that “the potential injury to plaintiff if review is refused is not substantial. Plaintiff will lose the opportunity to enlist in the Army, but will be deprived of no constitutionally cognizable liberty or property interest in the Army’s refusal to enlist him.”
*1416Appellant ' cites Thomas v. Review Board, 450 U.S. 707, 101 S.Ct. 1425, 67 L.Ed.2d 624 (1981), which overturned a state’s denial of unemployment compensation to a worker who quit his job for religious reasons, to show that denial of enlistment is a substantial injury. The Court in Thomas said:
[wjhere the state conditions receipt of an important benefit upon conduct proscribed by a religious ■ faith, or where it denies such a benefit because of conduct mandated by religious belief, thereby putting substantial pressure on an adherent to modify his behavior and to violate his beliefs, a burden upon religion exists. While the compulsion may be indirect, the infringement upon free exercise is nonetheless substantial.
450 U.S. at 717-18, 101 S.Ct. at 1432. Similarly, appellant cites Callahan v. Woods, supra, where this court held that requiring applicants for public assistance to furnish social security numbers “substantially interferes with the free exercise of [appellant’s] religious beliefs.” 736 F.2d at 1273.
If there were no more apposite authority, Thomas and Callahan could be read to support appellant’s position. However, there are three cases directly on point that give little weight to the injury flowing from denial of enlistment. See Lindenau v. Alexander, 663 F.2d at 74 (noting that “there is no right to enlist”); West v. Brown, 558 F.2d at 760; Henson v. Alexander, 478 F.Supp. at 1058 (“[t]he potential injury to plaintiff [from being denied enlistment] if review is refused does not weigh strongly for review as plaintiff is not being denied accrued benefits or incurring punishment”). The district court did not err in holding that appellant will suffer little legally cognizable injury from having to choose another career.
c. Interference with Military Functions and Extent of Military Discretion or Expertise
The third and fourth Mindes factors “present a single inquiry, focusing on disruption of military functions and distortion of factors such as troop morale which are important to the operation of the military.” Lindenau v. Alexander, 663 F.2d at 74 (quoting West v. Brown, 558 F.2d at 760).
Appellant challenges the district court’s finding that there would be significant interference with military functions and discretion. He claims that the court should not have relied on Army affidavits regarding disputed facts such as interference with military morale, discipline and defense against chemical weapons, as well as the Army’s ability to accommodate Sikhs. He also asserts that the court itself should have considered whether the Army could accommodate his religious beliefs without undue interference with its primary functions. As noted above, the former argument is incorrect because the district judge did not decide any factual issues, but only summarized military conclusions that he was not free to second-guess. See Lindenau v. Alexander, 663 F.2d at 74; West v. Brown, 558 F.2d 760-61 (declining to review the Army’s judgment about enlistment restrictions as set forth in an Army affidavit); Henson v. Alexander, 478 F.Supp. at 1058 (“the [enlistment] regulation embodies a great deal of military experience in matters of personnel and the military’s decision is entitled to deference since the regulation relates to the efficiency of the Army and National Guard”). The latter argument is incorrect because it rests on Rostker, which has already been distinguished. The district court did not err in citing the Army’s affidavits and finding that the third and fourth Mindes factors militate against judicial review.
We affirm the district court’s holding that a weighing of all the Mindes factors establishes the nonreviewability of appellant’s claims.
B. CONSIDERATION OF MATTERS OUTSIDE THE PLEADINGS
Appellant again asserts that the district court resolved numerous factual disputes based on Army affidavits, and that this is improper on a motion to dismiss. However, “[i]n ruling on a challenge to subject matter jurisdiction, the district court is ordinarily free to hear evidence regarding jurisdiction and to rule on that issue prior to trial, resolving factual disputes where *1417necessary.” Augustine v. United States, 704 F.2d 1074, 1077 (9th Cir.1983).
More importantly, as noted earlier, the district judge in this case did not decide any factual disputes. We decline to overturn the district court’s decision on this ground also.
C. SUMMARY JUDGMENT
Appellant once again asserts that factual issues going to the merits of the case were necessarily involved in determining the jurisdictional issue, and that the district court’s order should therefore be treated on appeal as a grant of summary judgment. See Augustine v. United States, 704 F.2d at 1077; Fed.R.Civ.P. 56. This argument is meritless.
As appellant himself complains, the district court did not weigh the strength of his claim. The other part of the Mindes test that might involve facts going to the merits is the determination of interference with military functions and discretion. The court could not “second-guess” the Army’s judgment on these matters. We must therefore treat the order as just what the district court said it was — a dismissal for lack of jurisdiction. See generally Timber-lane Lumber Co. v. Bank of America, 749 F.2d 1378, 1382 (9th Cir.1984). A contrary holding would mean that no Mindes challenge to a trial court’s jurisdiction could ever be disposed of by a motion to dismiss for lack of jurisdiction.
D. ADMINISTRATIVE PROCEDURE ACT CLAIM
Appellant also claims that the district court erred in not addressing his statutory claim under the Administrative Procedure Act. However, the Mindes test also applies to statutory claims against the military. The only substantial difference between the district court’s analysis of appellant’s constitutional claims and the proposed analysis of the APA claim is that constitutional claims give more weight to an argument for reviewability. See Mindes v. Seaman, 453 F.2d at 201. If the court did err in not addressing the issue, it was harmless error.
Ill
CONCLUSION
Appellant expresses understandable concern that if the Army prevents him from enlisting and the courts refuse to review that decision, he will be deprived of any means whatsoever of challenging the Army’s appearance regulations. It is true that his only recourse may be through the political process, a path that those concerned with Air Force regulations prohibiting the wearing of skullcaps are now pursuing. Although this may seem inadequate to some, every case from a Mindes circuit considering the reviewability of enlistment regulations or decisions has declined review rather than deciding the question on the merits. See Lindenau v. Alexander, supra; West v. Brown, supra; Henson v. Alexander, supra. These cases also make clear that as long as appellant does not enlist, such regulations do not interfere with the free exercise of his religion. Moreover, even if the district court had reached the merits, it would have been compelled to rule against appellant. See Sherwood v. Brown, supra. Mr. Khalsa is free to dress and groom himself as he pleases. He is not free to join the military if he cannot comply with military rules.
We affirm the district court’s dismissal of appellant’s claims for lack of subject matter jurisdiction.
. Although appellant cites no authority to support the application of Rostker in cases involving the reviewability of military regulations, our research has uncovered one relevant case. In Goldman v. Secretary of Defense, 530 F.Supp. 12 (D.D.C.1981), a district court in one of the two federal circuits that rejects the Mindes test granted a preliminary injunction against enforcement of an Air Force regulation prohibiting Jewish personnel from wearing skullcaps. The court applied a reviewability test purportedly derived from Rostker. After trial, the same district court granted a permanent injunction against the enforcement of the regulation, again relying on Rostker. Goldman v. Secretary of Defense, 29 Empl.Prac. Guide (CCH) j] 32,753 (D.D.C. April 26, 1982), vacated and remanded, 734 F.2d 1531 (D.C.Cir.1984). The language in the district court’s second opinion, which has been harshly criticized, closely resembled appellant’s argument here. See Folk, Military Appearance Requirements and Free Exercise of Religion, 98 Mil.L.Rev. 53, 86, (1982) ("the [district court’s] Goldman opinion is clearly based on a completely unwarranted interpretation of Rostker’s rationale. Also, the approach has no firm basis in logic, in principles of administrative law, or in jurisprudence regarding reviewability of military decisions"). On appeal, the D.C. Circuit vacated the judgment. The appellate court also applied a test purportedly derived from Rostker, although it appears less *1414rigorous than that applied by the lower court. In fact, the D.C. Circuit held that the regulation was justified by the Air Force’s interest in the strict enforcement of admittedly arbitrary rules. 734 F.2d at 1540. The Goldman case is therefore distinguishable on at least two grounds. First, it is from one of the two circuits that rejects the Mindes test, which is the law of this and seven other circuits. We have found no case from a Mindes circuit applying Rostker to determine the constitutionality of military regulations. Second, the D.C. Circuit did not apply appellant’s and the district court’s strict version of the Rostker test, but instead applied a much more deferential version to uphold a regulation for a reason that is equally applicable to the case at bar. Moreover, although these facts make it unnecessary to consider the wisdom of the D.C. Circuit’s approach to reviewability problems, we cannot say we find it very persuasive, for the reasons set forth in the body of this opinion and in the Folk article, supra.