
442 N.W.2d 786 (1989)
Mary MAMMENGA, Respondent,
v.
STATE of Minnesota DEPARTMENT OF HUMAN SERVICES, et al., Petitioners, Appellants.
No. C1-88-512.
Supreme Court of Minnesota.
July 21, 1989.
*787 Hubert H. Humphrey, III, Atty. Gen., John L. Kirwin, Asst. Atty. Gen., St. Paul, and D. Gerald Wilhelm, Martin County Atty., Fairmont, for petitioners, appellants.
Charles H. Thomas, Southern Minnesota Regional Legal Services, Inc., Mankato, for respondent.
Heard, considered, and decided by the court en banc.
SIMONETT, Justice.
We conclude that the agency rule by which respondent was denied general assistance (GA) benefits is a valid rule. We reverse the court of appeals.
To be eligible for GA benefits, a person must be without certain income and financial resources and, since 1985, must also come within one of the categories for ongoing *788 eligibility. These categories, 16 in number, were installed by the 1985 legislature to limit GA eligibility to persons for whom employment is not a realistic expectation. Thus Minn.Stat. § 256D.05 (1988), which sets out these categories, provides in part that a person who qualifies as being in financial need is entitled to general assistance if the person is 
(10) a person completing a secondary education program;
or
(12) a person who has substantial barriers to employment, including but not limited to factors relating to work or training history, as determined by the local agency in accordance with permanent or emergency rules adopted by the commissioner after consultation with the commissioner of jobs and training[.]
This appeal involves Minn.R. 9500.1258 (1987), adopted by the Commissioner of Human Services to implement the two statutory categories above quoted. The category of "completing a secondary education program" is interpreted in item K of the rule to be: "The applicant or recipient is completing high school." Minn.R. 9500.1258, subp. 1K (1987). Item M of the rule elaborates on the "substantial barriers to employment" category to include "is regularly attending a GED [General Education Development] program, with a minimum of six hours of classroom instruction per week." Minn.R. 9500.1258, subp. 1M(8) (1987).
In February 1986 respondent Mary Mammenga, age 46, began receiving GA benefits. She qualified under the Department's emergency rule then in effect as a person "regularly attending a GED program." Ms. Mammenga attended a GED course in Fairmont, Minnesota, one evening a week for 2 hours. This was the only GED instruction offered by the local school district. When, however, the permanent rules went into effect in August 1986, Ms. Mammenga could not meet the requirement for 6 hours of classroom instruction per week, and she was denied further benefits.
Respondent challenged the termination of her GA benefits before the local three-county human services department and then before the Commissioner of Human Services, but to no avail. Her appeal to the district court was also unsuccessful. She then appealed to the court of appeals, which reversed the agency's order terminating benefits. Mammenga v. State Dept. of Human Services, 428 N.W.2d 832 (Minn.App.1988). We granted the Department's and the local agency's petition for further review. (Although respondent has now completed her GED program, her case is not moot because of departmental claims for reimbursement of benefits paid.)
Before the court of appeals (and before us), Ms. Mammenga's argument has been that the Commissioner cannot by rule limit the statutory category of "secondary education program" to "completing high school," thereby effectively excluding GED instruction of any number of hours as a secondary education program. The court of appeals, however, did not reach this issue. Instead, it held that item M of the rule requiring 6 hours of GED instruction was unreasonable because, as to Ms. Mammenga and others like her living in rural Minnesota for whom no GED program with the requisite hours was available, the rule was "invalid as arbitrary, capricious and unreasonable." Id. at 838.
We will discuss first the "6 hours of instruction" rule and then the "completing high school" rule. Before discussing either rule, however, it might be helpful to comment on the standard of review.

I.
This is not a declaratory judgment action brought under sections 14.44 and 14.45 of the Administrative Procedure Act, Minn. Stat. ch. 14 (1988), to determine the validity of a rule prior to its enforcement. See Manufactured Housing Institute v. Pettersen, 347 N.W.2d 238 (Minn.1984) (example of pre-enforcement challenge). Rather, the validity of the rule is challenged here in a contested case involving an appeal of the decision of the Commissioner of Human Services in a public assistance case, *789 brought pursuant to Minn.Stat. § 256.045, subd. 7 (1988). The validity of a rule may, of course, be challenged in a contested case. Manufactured Housing, 347 N.W.2d at 240.
The standard of judicial review in a contested case is governed by Minn.Stat. § 14.69 (1988). Under this statute, the court may, among other specified grounds, decide whether an administrative decision is in violation of a constitutional provision, is in excess of statutory authority, or is arbitrary and capricious. The decision may be in violation of a constitutional provision if, for example, the agency rule applied in the decision lacks a rational basis so as to constitute a denial of due process. This kind of unreasonableness is, however, different from the kind of unreasonableness that renders an agency decision "arbitrary or capricious." See generally D. Skor, "Judicial Review of Contested Cases," Minnesota Administrative Procedure §§ 13.4.2(1) and 13.4.2(6) (1987).
An agency decision may be arbitrary or capricious if the decision is based on whim or is devoid of articulated reasons. Markwardt v. State Water Resources Bd., 254 N.W.2d 371, 374 (Minn.1977) (an agency decision is arbitrary or capricious where "its determination represents its will and not its judgment."). To say that a decision is unreasonable is not, however, the same thing as saying the agency rule which is applied in the decision is unreasonable. The rule itself is unreasonable (and therefore invalid) when it fails to comport with substantive due process because it is not rationally related to the objective sought to be achieved. See, e.g., Contos v. Herbst, 278 N.W.2d 732, 741 (Minn.1979) ("Where an economic regulation is involved, due process requires that legislative enactments not be arbitrary or capricious; or, stated differently, that they be a reasonable means to a permissive objective."), appeal dismissed, 444 U.S. 804, 100 S.Ct. 24, 62 L.Ed.2d 17 (1979). See also Sisson v. Triplett, 428 N.W.2d 565, 571 (Minn.1988); State v. Hopf, 323 N.W.2d 746, 752 (Minn. 1982). This same rational basis test applies whether the validity of the rule is questioned in a direct pre-enforcement challenge or, as here, in a contested hearing. See Manufactured Housing, 347 N.W.2d 238. Both section 14.45 (pre-enforcement challenge) and section 14.69 (contested case) list the violation of constitutional provisions as a basis for judicial review. (But section 14.45 does not, unlike section 14.69, list "arbitrary or capricious" as a ground for review because a pre-enforcement challenge does not involve review of an agency decision in a particular case.)
In this case, it is clear that the Commissioner's decision is reasonable in the sense that it is a principled decision. The Commissioner applied the Department's rule properly to the facts of Ms. Mammenga's case. The rule itself is unambiguous and the facts are undisputed. In following its own rule, as it was required to do, the Department was acting reasonably; its decision was not arbitrary or capricious.
Sometimes, in applying a rule in a contested case, a factual situation that did not surface during the rulemaking process will come to light and show that the rule as applied to the newly revealed situation lacks a rational connection to the legislative objectives. It is in this sense that it is sometimes said that a rule is invalid "as applied." See, e.g., Broen Memorial Home v. Minnesota Dept. of Human Services, 364 N.W.2d 436, 440 (Minn.App.1985).
As the Commissioner points out, there is some confusion in the use of the phrase "unreasonable as applied." Here, for example, the court of appeals seems to suggest that the rule is invalid because, as applied, it is unfair to Ms. Mammenga. The mere fact, however, that application of a rule may yield a harsh or undesirable result in a particular case does not make the rule invalid. Wickard v. Filburn, 317 U.S. 111, 129-30, 63 S.Ct. 82, 91, 87 L.Ed. 122 (1942); Tepel v. Sima, 213 Minn. 526, 536, 7 N.W.2d 532, 537 (1942) (following Wickard). To say a rule is "invalid as applied" means that the rule is invalid if, as employed, it is unreasonable in a due process sense, i.e., that the rule is not rationally related to the legislative ends sought to *790 be achieved. See Broen, 364 N.W.2d at 440 ("The reasonableness of a rule is viewed toward the end sought to be achieved and not in light of its application to a particular party.").
St. Paul v. Dalsin, 245 Minn. 325, 71 N.W.2d 855 (1955), illustrates the distinction being made here. There a city ordinance required roofers, who incidentally installed sheet metal flashing while roofing, to be qualified to do warm air heating, ventilation, and general sheet metal work. The court held the ordinance invalid and unenforceable as to roofers, not because the ordinance requirement was unfair to the defendant roofer (although it may have been), but because the licensing requirement "has no reasonable relation to any justifiable regulation of the roofing trade." Id. at 330, 71 N.W.2d at 859. Insofar as the ordinance related to roofers, the court concluded that the ordinance "must be held unconstitutional" (emphasis added). Id.
In this case, tben, our inquiry is to determine if the "6 hours GED" rule is rationally related to the ends sought to be legitimately achieved by the general assistance statute.

II.
The court of appeals held the rule requiring 6 hours of GED instruction to be invalid. Evidence presented at the contested case hearing established that the great majority of communities outside the metro area offer less than 6 hours of GED classes a week. Only in the Minneapolis-St. Paul area are GED programs of 6 hours a week quite common. The panel, therefore, reasoned: (1) the purpose of general assistance is to help the poor; (2) poor people outside the metro area cannot qualify for GA benefits by enrolling in a GED program because GED programs in those areas do not offer 6 hours a week as required by the rule; consequently, (3) the rule, though uniformly applied, unfairly and unreasonably bars rural participation in the GA program and, therefore, is invalid.
The difficulty with this analysis is that it is directed at a perceived unfairness in the legislative scheme, not in the Department's rule. The 1985 legislation provides that only those poor persons who come within certain specified categories are to receive general assistance. The issue is not whether this is wise policy (legislative wisdom is for the legislature), but whether the agency's rule is rationally related to the legislature's enunciated policy. One of the statutory categories is for persons with "substantial barriers to employment." The legislature instructed the agency to establish by rule what these barriers would be. In its rule, the agency identified a number of barriers such as living in a local labor market with no suitable employment or attending a GED program with a minimum 6 hours of classroom instruction per week. The agency felt that a time commitment of that many hours in obtaining an education would be a substantial barrier to holding a meaningful job.
We think the agency's rule has a rational basis. Attending school 6 hours a week (plus study time) is a reasonable definition of a substantial barrier to holding outside employment. A rule which would define only 2 hours of classes a week as an employment barrier would seem to be patently unrealistic. Indeed, respondent Mammenga has never claimed otherwise, and the evidence shows rural communities limit GED classes to only a few hours a week so as not to interfere with job commitments.
Interestingly enough, the rule as first proposed by the Commissioner stated that a GA recipient with a substantial barrier to employment would be a person who "is completing a GED program, the time commitment of which precludes participation in work readiness." This proposal was criticized because it left too much discretion to the local agency to determine eligibility. To meet this criticism, the Commissioner amended the proposed rule to establish a bright line of 6 hours of GED classes per week. In fact, the 6-hour requirement was added at the request of a representative of the Legal Services Advocacy Project, and over the objection of Hennepin County that GED participation is never a substantial barrier to employment. Contrary to the concern of the appeals panel, we might *791 add, the rulemaking record here was more than adequate to support the 6-hour rule requirement. The rulemaking record varies with the nature of the rule; in some cases a substantial evidentiary record may be needed, as in Manufactured Housing, while in other cases, "common knowledge" or "common sense" will suffice. See generally G. Beck and T. Muck, "Need and Reasonableness and Substantial Change," Minnesota Administrative Procedure § 23.2 (1987). In this case, the issue was not how many GED programs in rural Minnesota offered 6 hours of instruction per week but how many hours of GED instruction could be attended without interfering with holding a job.
We hold that the 6-hour rule is rationally related to the purposes of the 1985 amendments to the general assistance statute, and that the rule is reasonable and valid.

III.
We now reach the issue which was not reached by the court of appeals. This issue might be framed as follows: In defining "completing a secondary education program" as "completing high school," did the agency exceed its statutory authority?
It will be recalled that the 1985 legislature established 16 categories for assistance eligibility. One of these, which we have just discussed, is the "substantial barriers to employment" category. Another is the "completing a secondary education program." Respondent contends a GED program is a secondary education program. If this is true, says Ms. Mammenga, then the Commissioner exceeded his statutory authority, first, in excluding GED instruction from the secondary education program category, and, second, in requiring GED instruction to consist of at least 6 classroom hours per week. Nothing in the statute says a secondary education program must have a minimum number of classroom hours per week; and, as respondent points out, the initial emergency rule promulgated by the Commissioner lumped together as a single category "people who are going to high school or are in a G.E.D. program."
The Commissioner, on the other hand, argues that "secondary education program," properly understood within the context of the general assistance program, should refer only to high school. The Commissioner points to the definition of "secondary school" in the school law. See Minn.Stat. § 120.05, subd. 2(3) (1988) ("any school with * * * enrollment of pupils ordinarily in grades 7 through 12 * * * meeting the standards established by the state board of education."). Respondent counters by citing the rule of the Department of Education that a GED equivalency certificate is comparable to a high school diploma. See Minn.R. 3500.3100 (1987). Also, argues respondent, the general assistance program is directed at the adult poor, but the Commissioner's rule, by limiting eligibility to those attending high school (in other words, those under age 21), excludes from GA benefits people over age 21 who are seeking a secondary education. During the rulemaking process, the representative of the Legal Services Advocacy Project made these very objections, contending that the Commissioner lacked authority to limit the eligibility of GED students through rulemaking.
The purpose of the 1985 amendments is to make GA assistance available to those poor people who cannot be expected to hold employment either because of disability or because they must spend substantial time on specified activities (such as schooling) which preclude employment. See generally Ward v. Smaby, 405 N.W.2d 254 (Minn. App.1987). Having a secondary school education would be valuable in obtaining employment and, therefore, the legislature provided that a person "completing a secondary school education program" would be eligible for GA assistance. Implicit in this grant of eligibility, however, was the realization that a recipient attending school would not have time to hold a job. The Commissioner, therefore, distinguished between a person obtaining a secondary school education by attending high school, traditionally a full-time occupation, and a person obtaining an equivalent education by attending a GED program where the *792 time commitment is much more lenient. This distinction is also consistent with the legislative descriptions of the two kinds of schooling. The legislature refers to the GED program as an "adult basic and continuing education program," not as a "secondary education program." See Minn. Stat. § 124.26, subd. 1b (1988). Further, the statutes specifically distinguish between a "program of an elementary or secondary school" and "course work for a general educational development (GED) diploma." See Minn.Stat. § 256.736, subd. 3b(a)(2)(i) and (ii) (1988). Consequently, the Commissioner defined "completing a secondary education program" as "completing high school." Nevertheless, recognizing that some GED programs involve a fairly substantial time commitment, the Commissioner, in the separate category of "substantial barriers to employment," included a person attending a GED program requiring at least 6 hours of classroom instruction per week.
While we are not bound by an agency's interpretation of its governing statute, it is also true that "[w]hen the meaning of a statute is doubtful, courts should give great weight to a construction placed upon it by the Department charged with its administration." Krumm v. R.A. Nadeau Co., 276 N.W.2d 641, 644 (Minn.1979). See also Hopf, 323 N.W.2d at 752.
We believe that the Commissioner had the authority to interpret the phrase "completing a secondary education program" and that the interpretation set out in parts K and M(8) of the rule is reasonable in light of the purpose of the 1985 general assistance legislation. This view is strengthened by the fact that the legislative scheme also includes a "work readiness" program to assist marginally employable persons who do not fit within one of the specified categories for GA eligibility. Minn.Stat. § 256D.051 (1988). There is a further eligibility category, too, for a person determined by a vocational specialist "to be unable to obtain or retain suitable employment." Minn.R. 9500.1258, subp. 1M(4) (1987). In other words, a recipient who is unable to attend a GED program with the requisite number of hours may be eligible under another category, or may at least be eligible for the "work readiness" program.
Having in mind the sweeping changes in the general assistance law inaugurated by the 1985 amendments, we do not think it unreasonable or impermissible for the Commissioner's rule to interpret "completing a secondary education program" as completing high school when persons who are attending GED classes only a few hours a week are able to support themselves and participate in the work readiness program. We hold that the "high school" rule is valid.
Reversed.
WAHL, Justice (dissenting).
I must respectfully dissent. The question is not whether the commissioner can validly, though unfairly, enforce Minn.Rule 9500.1258, subp. 1M(8) (1987), requiring 6 hours per week of GED instruction against Mary Mammenga, but whether she is "completing a secondary education program" so as to be eligible for general assistance benefits under Minn.Stat. § 256D.05, subd. 1(a)(10) (1988).
The legislature enacted Minn.Stat. §§ 256D.01 to 256D.21 to provide general assistance (GA) "to persons unable to provide themselves with a reasonable subsistence compatible with decency and health and who are not otherwise provided for under the laws of this state or the United States." Minn.Stat. § 265D.02, subd. 4 (1988). There is no requirement that such persons reside in or near one of the population centers of the state.
Mary Mammenga, age 46, lives in rural Minnesota. She has claimed throughout this litigation that she is entitled to general assistance eligibility under § 256D.05, subd. 1(a)(10) because she is "completing a secondary education program." She was enrolled in the only secondary education program available to her, the G.E.D. program in Fairmont, Minnesota, which provided two hours of weekly classroom instruction.[1]*793 She made a "good effort" and, indeed, continued the program to completion. Nonetheless, Mammenga's GA benefits were terminated because the Department of Human Services, through Minn. Rule 9500.1258, subp. 1K, interpreted the statute to mean only those persons completing high school are eligible to receive GA benefits under § 265D.05, subd. 1(a)(10). Since Mammenga was not attending a "high school" but a GED program, she was further excluded from benefits under § 256D.05, subd. 1(a)(12) because her GED program did not meet the six-hour requirement of Minn.Rule 9500.1258, subp. 1M(8).
The Commissioner's narrow interpretation of § 256D.05, subd. 1(a)(10) equating "secondary education program" with "high school" conflicts with the fundamental purpose of the GA act as expressed in the statutory language.
Nothing in chapter 256D requires that GA benefits should be extended only to those people who are unable to hold a job because of time restraints. Clause 10 of subdivision 1(a) quite clearly envisions participation in secondary education programs other than traditional high school with no hint of a minimum time commitment to satisfy the requirements of GA eligibility.
Persons without a secondary education, whether evidenced by lack of a high school diploma or lack of a GED certificate, are severely disadvantaged in obtaining employment. The legislature intended GA benefits to be provided to such disadvantaged adults who are willing to remove the barrier to employment by obtaining a high school diploma or its GED equivalent. As respondent rightly notes, "the Legislature could not have intended to deny a minimum subsistence compatible with decency and health to individuals such as respondent Mammenga who in good faith are doing everything within their power to complete the only programs of secondary education available to them."
Because the plain words of Minn.Stat. § 256D.05, subd. 1(a)(10) mean more than high school, because the scope of Clause 10 is not limited to attendance in high school and because the commissioner's rulemaking on GED programs operates to arbitrarily exclude most poor persons in rural Minnesota from establishing GA eligibility by pursuit of a GED program, I would hold the Department of Human Services Rule limiting GA eligibility under Clause 10 to those attending high school to be unreasonable.
KEITH, Justice (dissenting).
I join in the dissent of Justice WAHL.
NOTES
[1]  A survey of the availability of GED classroom instruction throughout the state revealed that the majority of rural GED programs provided less than six hours of weekly classroom instruction.
