MT#5349 API: Implement validation for dom prefs.