Yes, the UC’s and CSU’s use grade validation for Math and Foreign Language courses only. If you receive a D or F 2nd semester of a Math course and you take the next higher level Math class (Geometry/Algebra2/Pre-Calc etc) and pass with a C or higher, it validates the D in Algebra. The D grade is still reported on your CSU/UC application and since it was in 9th grade, it is not calculated into your UC/CSU GPA (only 10-11th grades). It also means that you meet the a-g course requirement for Math.
The a-g subject requirements:
History/social science (“a”) – Two years, including one year of world history, cultures and historical geography and one year of U.S. history, or one-half year of U.S. history and one-half year of American government or civics.
English (“b”) – Four years of college preparatory English that integrates reading of classic and modern literature, frequent and regular writing, and practice listening and speaking.
Mathematics (“c”) –Three years of college-preparatory math, including or integrating the topics covered in elementary and advanced algebra and two- and three-dimensional geometry.
Laboratory science (“d”) – Two years of laboratory science providing fundamental knowledge in at least two of the three disciplines of biology, chemistry and physics.
Language other than English (“e”) – Two years of the same language other than English or equivalent to the second level of high school instruction.
Visual and performing arts (“f”) – One year chosen from dance, music, theater or the visual arts.
College-preparatory elective (“g”) – One year chosen from the “a-f” courses beyond those used to satisfy the requirements above, or courses that have been approved solely in the elective area.
http://admission.universityofcalifornia.edu/counselors/files/csu-uc-a-g-comparison-matrix.pdf