diff --git a/.gitignore b/.gitignore index 69ca520..1375525 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.idea/misc.xml + **/.DS_Store # Compiled class file diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 03128f2..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -smarthut \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index a55e7a1..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index fdc392f..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index c2c3244..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/User.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/User.java index a3b9202..1be3df0 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/User.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/User.java @@ -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; /**