Fixed validators and added tests for validators.