We can use the validator api for this.