Added method createValidValue(), copied from form loader