Merge branch 'email-fix' into 'dev'
Fix to email constraint See merge request sa4-2020/the-sanmarinoes/backend!11
This commit is contained in:
commit
6a244b27f1
3 changed files with 9 additions and 7 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
.idea/misc.xml
|
||||
|
||||
**/.DS_Store
|
||||
|
||||
# Compiled class file
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="11.0.3" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="12.0.1" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
|
@ -2,11 +2,7 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
|
|||
|
||||
import java.util.Set;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/** A user of the Smarthut application */
|
||||
@Entity(name = "smarthutuser")
|
||||
|
@ -33,7 +29,11 @@ public class User {
|
|||
@NotNull
|
||||
@Column(nullable = false)
|
||||
@NotEmpty(message = "Please provide a password")
|
||||
@Min(value = 6, message = "Your password should be at least 6 characters long")
|
||||
@Size(
|
||||
min = 6,
|
||||
max = 255,
|
||||
message =
|
||||
"Your password should be at least 6 characters long and at most 255 chars long")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue