The next step is to create the required constraints. I start with the constraints for the street property. val addressValidator = Validator<Address> {this.street{isNotEmpty() otherwise {“Street must not be empty.”}constrain {it.matches(“[a-zA-Z\\s]+”.toRegex())} otherwise {“Street must contain only letters.”}}} The value must not be empty and also it…