Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
artemsa223 committed Feb 29, 2024
1 parent e1a70a4 commit df62286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ public class UserRegistrationRequestDto {
private String password;
@Length(min = 8, max = 35)
private String repeatPassword;
@NotBlank
private String firstName;
@NotBlank
private String lastName;
@NotBlank
private String shippingAddress;

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ public boolean isValid(final Object value, final ConstraintValidatorContext cont

valid = firstObj == null && secondObj == null
|| firstObj != null && firstObj.equals(secondObj);
} catch (final Exception ignore) {
// ignore
} catch (final Exception ex) {
System.err.println("An error occurred while comparing properties: " + ex.getMessage());
ex.printStackTrace();
}
if (!valid) {
context.buildConstraintViolationWithTemplate(message)
Expand Down

0 comments on commit df62286

Please sign in to comment.