validateConfig method needs to be static to work inside factory