Skip to content
Snippets Groups Projects
Commit 6a52ecb2 authored by Dominik Pilar's avatar Dominik Pilar
Browse files

Updated constraint validators of attributes and fixed validation messages.

parent 5bc29920
No related branches found
No related tags found
1 merge request!46Updated constraint validators of attributes and fixed validation messages.
Pipeline #83296 passed with stages
in 1 minute and 58 seconds
Showing
with 130 additions and 116 deletions
......@@ -17,7 +17,7 @@ import java.util.Objects;
public class PhaseCreateDTO {
@ApiModelProperty(value = "Type of phase.", required = true, allowableValues = "QUESTIONNAIRE, INFO, TRAINING", example = "TRAINING")
@NotNull(message = "Phase type must be specified")
@NotNull(message = "{phase.phaseType.NotNull.message}")
private PhaseType phaseType;
@ApiModelProperty(value = "Type of questionnaire.", allowableValues = "ADAPTIVE, GENERAL", example = "ADAPTIVE")
......
......@@ -13,14 +13,14 @@ import java.util.Objects;
public class QuestionChoiceImportDTO {
@ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
@NotEmpty(message = "{questionChoices.text.NotEmpty.message}")
@NotEmpty(message = "{questionChoice.text.NotEmpty.message}")
private String text;
@ApiModelProperty(value = "It defines whether this answer is correct or not", required = true, example = "true")
@NotNull(message = "{questionChoices.correct.NotNull.message}")
@NotNull(message = "{questionChoice.correct.NotNull.message}")
private Boolean correct;
@ApiModelProperty(value = "Order of question choice", required = true, example = "0")
@NotNull(message = "{questionChoices.order.NotNull.message}")
@Min(value = 0, message = "{questionChoices.order.Min.message}")
@NotNull(message = "{questionChoice.order.NotNull.message}")
@Min(value = 0, message = "{questionChoice.order.Min.message}")
private Integer order;
public String getText() {
......
......@@ -6,7 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Objects;
import java.util.Set;
@ApiModel(
......@@ -14,21 +13,20 @@ import java.util.Set;
)
public class QuestionPhaseRelationImportDTO {
@ApiModelProperty(value = "Order of question", required = true, example = "0"
)
@NotNull(message = "{questionnairePhaseRelation.order.NotNull.message}")
@Min(value = 0, message = "{questionnairePhaseRelation.order.Min.message}")
@ApiModelProperty(value = "Order of question", required = true, example = "0")
@NotNull(message = "{questionPhaseRelation.order.NotNull.message}")
@Min(value = 0, message = "{questionPhaseRelation.order.Min.message}")
private Integer order;
@ApiModelProperty(value = "ID of training phase to which the questions are related of question", required = true, example = "1", position = 1)
@NotNull(message = "{questionnairePhaseRelation.phaseOrder.NotNull.message}")
@Min(value = 0, message = "{questionnairePhaseRelation.phaseOrder.Min.message}")
@NotNull(message = "{questionPhaseRelation.phaseOrder.NotNull.message}")
@Min(value = 0, message = "{questionPhaseRelation.phaseOrder.Min.message}")
private Integer phaseOrder;
@ApiModelProperty(value = "Percentage that defines whether a player was successful or not ", required = true, example = "50", position = 2)
@Min(value = 0, message = "{questionnairePhaseRelation.successRate.Min.message}")
@Max(value = 100, message = "{questionnairePhaseRelation.successRate.Max.message}")
@Min(value = 0, message = "{questionPhaseRelation.successRate.Min.message}")
@Max(value = 100, message = "{questionPhaseRelation.successRate.Max.message}")
private int successRate;
@ApiModelProperty(value = "Set of IDs of questions related to the specified questionnaire", position = 3)
@NotNull(message = "{questionnairePhaseRelation.questionOrders.NotNull.message}")
@NotNull(message = "{questionPhaseRelation.questionOrders.NotNull.message}")
private Set<Integer> questionOrders;
public Integer getOrder() {
......
......@@ -32,7 +32,7 @@ public class TaskImportDTO {
@NotEmpty(message = "{task.solution.NotEmpty.message}")
private String solution;
@ApiModelProperty(value = "How many times player can submit incorrect answer before displaying solution.", example = "5", position = 5)
@NotNull(message = "{task.incorrectAnswerLimit.NotEmpty.message}")
@NotNull(message = "{task.incorrectAnswerLimit.NotNull.message}")
@Min(value = 0, message = "{task.incorrectAnswerLimit.Min.message}")
@Max(value = 100, message = "{task.incorrectAnswerLimit.Max.message}")
private int incorrectAnswerLimit;
......
......@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
......@@ -19,7 +20,7 @@ import java.util.List;
)
public class TrainingPhaseImportDTO extends AbstractPhaseImportDTO {
@ApiModelProperty(value = "Estimated time it takes to finish the phase (in seconds).", example = "50")
@ApiModelProperty(value = "Estimated time it takes to finish the phase (in minutes).", example = "50")
@Min(value = 0, message = "{trainingPhase.estimatedDuration.Size.message}")
private int estimatedDuration;
@ApiModelProperty(value = "Number of allowed commands that can be used to solve the task (used for data analysis).", example = "10", position = 1)
......@@ -33,6 +34,7 @@ public class TrainingPhaseImportDTO extends AbstractPhaseImportDTO {
private List<TaskImportDTO> tasks = new ArrayList<>();
@ApiModelProperty(value = "Decision matrix associated with the training phase", required = true, position = 4)
@Valid
@NotEmpty(message = "{trainingPhase.decisionMatrix.NotEmpty.message}")
private List<DecisionMatrixRowImportDTO> decisionMatrix;
/**
......
......@@ -4,6 +4,8 @@ import cz.muni.ics.kypo.training.adaptive.enums.QuestionType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
......@@ -15,14 +17,15 @@ import java.util.Objects;
public abstract class AbstractQuestionDTO {
@ApiModelProperty(value = "Order of question", required = true, example = "0")
@NotNull(message = "Question order must be specified")
@Min(value = 0, message = "{question.order.Min.message}")
private int order;
@ApiModelProperty(value = "The question that will be displayed to a player", required = true, example = "What's the capital of Canada?")
@NotEmpty(message = "Text of question must not be blank")
@NotEmpty(message = "{question.text.NotEmpty.message}")
private String text;
@ApiModelProperty(value = "It defines the type of the question", allowableValues = "FFQ, MCQ, RFQ", required = true, example = "MCQ")
@NotNull(message = "Question type must be specified")
@NotNull(message = "{question.questionType.NotNull.message}")
private QuestionType questionType;
@Valid
@ApiModelProperty(value = "Choices that are distributed with the question", required = true)
private List<QuestionChoiceDTO> choices = new ArrayList<>();
......
......@@ -12,7 +12,7 @@ import java.util.Set;
public class QuestionAnswerDTO {
@ApiModelProperty(value = "ID of answered question", example = "1")
@NotNull(message = "ID of the answered question must not be null")
@NotNull(message = "{questionAnswer.questionId.NotNull.message}")
private Long questionId;
@ApiModelProperty(value = "Answer to the question", example = "[\"An answer\"]")
private Set<String> answers;
......
......@@ -14,13 +14,13 @@ public class QuestionChoiceDTO {
@ApiModelProperty(value = "Question choice ID. Leave blank if new choice is added", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
@NotEmpty(message = "Task title must not be blank")
@NotEmpty(message = "{questionChoice.text.NotEmpty.message}")
private String text;
@ApiModelProperty(value = "It defines whether this answer is correct or not", required = true, example = "true")
@NotNull(message = "It must be specified whether a question choice is correct")
@NotNull(message = "{questionChoice.correct.NotNull.message}")
private Boolean correct;
@ApiModelProperty(value = "Order of question choice", required = true, example = "0")
@NotNull(message = "Question choice order must be specified")
@NotNull(message = "{questionChoice.order.NotNull.message}")
private Integer order;
public Long getId() {
......
......@@ -16,16 +16,18 @@ public class QuestionPhaseRelationDTO {
@ApiModelProperty(value = "Question-Phase relation ID. Leave blank if a new one is added", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "Order of question", required = true, example = "0")
@NotNull(message = "Question order must be specified")
@NotNull(message = "{questionPhaseRelation.order.NotNull.message}")
@Min(value = 0, message = "{questionPhaseRelation.order.Min.message}")
private Integer order;
@ApiModelProperty(value = "Set of IDs of questions related to the specified questionnaire")
@NotNull(message = "{questionPhaseRelation.questionIds.NotNull.message}")
private Set<Long> questionIds;
@ApiModelProperty(value = "ID of training phase to which the questions are related of question", required = true, example = "1")
@NotNull(message = "Phase ID in question-phase relations must not be null")
@NotNull(message = "{questionPhaseRelation.phaseId.NotNull.message}")
private Long phaseId;
@ApiModelProperty(value = "Percentage that defines whether a player was successful or not ", required = true, example = "50")
@Min(value = 0, message = "Success rate must not be lower than 0 %")
@Max(value = 100, message = "Success rate must not be higher than 100 %")
@Min(value = 0, message = "{questionPhaseRelation.successRate.Min.message}")
@Max(value = 100, message = "{questionPhaseRelation.successRate.Max.message}")
private int successRate;
public Long getId() {
......
......@@ -14,7 +14,7 @@ import java.util.Objects;
public class QuestionnaireUpdateDTO {
@ApiModelProperty(value = "Title of questionnaire", required = true, example = "Entrance test")
@NotEmpty(message = "Questionnaire title must not be blank")
@NotEmpty(message = "{questionnairePhase.title.NotEmpty.message}")
private String title;
@Valid
@ApiModelProperty(value = "Questions in the questionnaire", required = true)
......
......@@ -2,8 +2,6 @@ package cz.muni.ics.kypo.training.adaptive.dto.questionnaire.view;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Objects;
public class QuestionChoiceViewDTO {
......@@ -11,10 +9,8 @@ public class QuestionChoiceViewDTO {
@ApiModelProperty(value = "Question choice ID. Leave blank if new choice is added", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "Short description of question choice", required = true, example = "An answer")
@NotEmpty(message = "Task title must not be blank")
private String text;
@ApiModelProperty(value = "Order of question choice", required = true, example = "0")
@NotNull(message = "Question choice order must be specified")
private Integer order;
public Long getId() {
......
package cz.muni.ics.kypo.training.adaptive.dto.questionnaire.view;
import cz.muni.ics.kypo.training.adaptive.dto.questionnaire.QuestionChoiceDTO;
import cz.muni.ics.kypo.training.adaptive.enums.QuestionType;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Objects;
......@@ -14,13 +11,10 @@ public class QuestionViewDTO {
@ApiModelProperty(value = "Question ID. Leave blank if a new question is added", required = true, example = "1")
private Long id;
@ApiModelProperty(value = "Order of question", required = true, example = "0")
@NotNull(message = "Question order must be specified")
private int order;
@ApiModelProperty(value = "The question that will be displayed to a player", required = true, example = "What's the capital of Canada?")
@NotEmpty(message = "Text of question must not be blank")
private String text;
@ApiModelProperty(value = "It defines the type of the question", allowableValues = "FFQ, MCQ, RFQ", required = true, example = "MCQ")
@NotNull(message = "Question type must be specified")
private QuestionType questionType;
@ApiModelProperty(value = "Choices that are distributed with the question", required = true)
private List<QuestionChoiceViewDTO> choices;
......
......@@ -3,9 +3,7 @@ package cz.muni.ics.kypo.training.adaptive.dto.training;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import javax.validation.constraints.*;
import java.util.Objects;
@ApiModel(
value = "TaskCopyDTO"
......@@ -13,25 +11,26 @@ import java.util.Objects;
public class TaskCopyDTO {
@ApiModelProperty(value = "Short description of task", required = true, example = "Task title")
@NotEmpty(message = "Task title must not be blank")
@NotEmpty(message = "{task.title.NotEmpty.message}")
private String title;
@ApiModelProperty(value = "The information that are displayed to a player", required = true, example = "Capture the flag", position = 1)
@NotEmpty(message = "Task content must not be blank")
@NotEmpty(message = "{task.content.NotEmpty.message}")
private String content;
@ApiModelProperty(value = "Keyword that must be found in the task. Necessary in order to get to the next phase", required = true, example = "secretFlag", position = 2)
@NotEmpty(message = "Answer of task cannot be null")
@NotEmpty(message = "{task.answer.NotEmpty.message}")
private String answer;
@ApiModelProperty(value = "Description how to get the answer", required = true, example = "Open secret.txt", position = 3)
@NotEmpty(message = "Solution of task cannot be null")
@NotEmpty(message = "{task.solution.NotEmpty.message}")
private String solution;
@ApiModelProperty(value = "It defines the allowed number of incorrect answers submitted by the player", required = true, example = "5", position = 4)
@NotNull(message = "Limit of the number of provided incorrect answers must be specified")
@PositiveOrZero(message = "Limit of the number of provided incorrect answers must not be a negative number")
@NotNull(message = "{task.incorrectAnswerLimit.NotNull.message}")
@Min(value = 0, message = "{task.incorrectAnswerLimit.Min.message}")
@Max(value = 100, message = "{task.incorrectAnswerLimit.Max.message}")
private Integer incorrectAnswerLimit;
@ApiModelProperty(value = "It defines whether the sandbox can be modified", example = "true", position = 5)
private boolean modifySandbox;
@ApiModelProperty(value = "It defines the expected duration of sandbox change defined in seconds", example = "15", position = 6)
@PositiveOrZero(message = "Estimated duration of sandbox change must not be a negative number")
@Min(value = 0, message = "{task.sandboxChangeExpectedDuration.Min.message}")
private int sandboxChangeExpectedDuration;
public String getTitle() {
......
......@@ -3,9 +3,7 @@ package cz.muni.ics.kypo.training.adaptive.dto.training;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import javax.validation.constraints.*;
import java.util.Objects;
@ApiModel(
......@@ -14,25 +12,27 @@ import java.util.Objects;
public class TaskUpdateDTO {
@ApiModelProperty(value = "Short description of task", required = true, example = "Task title")
@NotEmpty(message = "Task title must not be blank")
@NotEmpty(message = "{task.title.NotEmpty.message}")
private String title;
@ApiModelProperty(value = "The information that are displayed to a player", required = true, example = "Capture the flag", position = 1)
@NotEmpty(message = "Task content must not be blank")
@NotEmpty(message = "{task.content.NotEmpty.message}")
private String content;
@ApiModelProperty(value = "Keyword that must be found in the task. Necessary in order to get to the next phase", required = true, example = "secretFlag", position = 2)
@NotEmpty(message = "Answer of task cannot be null")
@NotEmpty(message = "{task.answer.NotEmpty.message}")
@Size(max = 50, message = "{task.answer.Size.message}")
private String answer;
@ApiModelProperty(value = "Description how to get the answer", required = true, example = "Open secret.txt", position = 3)
@NotEmpty(message = "Solution of task cannot be null")
@NotEmpty(message = "{task.solution.NotEmpty.message}")
private String solution;
@ApiModelProperty(value = "It defines the allowed number of incorrect answers submitted by the player", required = true, example = "5", position = 4)
@NotNull(message = "Limit of the number of provided incorrect answers must be specified")
@PositiveOrZero(message = "Limit of the number of provided incorrect answers must not be a negative number")
@NotNull(message = "{task.incorrectAnswerLimit.NotNull.message}")
@Min(value = 0, message = "{task.incorrectAnswerLimit.Min.message}")
@Max(value = 100, message = "{task.incorrectAnswerLimit.Max.message}")
private Integer incorrectAnswerLimit;
@ApiModelProperty(value = "It defines whether the sandbox can be modified", example = "true", position = 5)
private boolean modifySandbox;
@ApiModelProperty(value = "It defines the expected duration of sandbox change defined in seconds", example = "15", position = 1)
@PositiveOrZero(message = "Estimated duration of sandbox change must not be a negative number")
@Min(value = 0, message = "{task.sandboxChangeExpectedDuration.Min.message}")
private int sandboxChangeExpectedDuration;
public String getTitle() {
......
......@@ -4,8 +4,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import java.util.Objects;
......@@ -16,20 +18,23 @@ import java.util.Objects;
public class TrainingPhaseUpdateDTO {
@ApiModelProperty(value = "Short description of training phase", required = true, example = "Training phase title")
@NotEmpty(message = "Training phase title must not be blank")
@NotEmpty(message = "{trainingPhase.title.NotEmpty.message}")
private String title;
@ApiModelProperty(value = "Maximal number of allowed wrong answers provided by played", required = true, example = "10", position = 1)
@NotNull(message = "Maximal number of allowed wrong answers must be set")
@NotNull(message = "{trainingPhase.allowedWrongAnswers.NotNull.message}")
@Min(value = 0, message = "{trainingPhase.allowedWrongAnswers.Min.message}")
private Integer allowedWrongAnswers;
@ApiModelProperty(value = "Maximal number of allowed commands provided by played", required = true, example = "10", position = 2)
@NotNull(message = "Maximal number of allowed commands must be set")
@NotNull(message = "{trainingPhase.allowedCommands.NotNull.message}")
@Min(value = 0, message = "{trainingPhase.allowedCommands.Min.message}")
private Integer allowedCommands;
@ApiModelProperty(value = "Estimated time (minutes) taken by the player to solve the training phase", example = "20", position = 3)
@NotNull(message = "Estimated duration of training phase must be set")
@NotNull(message = "{trainingPhase.estimatedDuration.NotNull.message}")
@Min(value = 0, message = "{trainingPhase.estimatedDuration.Min.message}")
private Integer estimatedDuration;
@ApiModelProperty(value = "Decision matrix associated with the training phase", required = true, position = 4)
@Valid
@NotNull(message = "Decision matrix of training phase must be set")
@NotEmpty(message = "{trainingPhase.decisionMatrix.NotEmpty.message}")
private List<DecisionMatrixRowDTO> decisionMatrix;
public String getTitle() {
......
......@@ -6,28 +6,32 @@ phase.order.NotNull.message=Phase field 'order' cannot be null.
phase.order.Min.message=Phase field 'order' cannot be lower than 0.
#QUESTIONNAIRE PHASE
questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase field 'questionnaireType' cannot be null.
questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation field 'order' cannot be null.
questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation field 'order' cannot be lower than 0.
questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation field 'questionIds' cannot be null.
questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation field 'questionIds' must contain at least one value.
questionnairePhaseRelation.questionOrders.NotNull.message=Questionnaire Phase Relation field 'questionOrders' cannot be null.
questionnairePhaseRelation.questionOrders.Size.message=Questionnaire Phase Relation field 'questionOrders' must contain at least one value.
questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation field 'phaseId' cannot be null.
questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation field 'phaseId' cannot be lower than 0.
questionnairePhaseRelation.phaseOrder.NotNull.message=Questionnaire Phase Relation field 'phaseOrder' cannot be null.
questionnairePhaseRelation.phaseOrder.Min.message=Questionnaire Phase Relation field 'phaseOrder' cannot be lower than 0.
questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation field 'successRate' cannot be lower than 0.
questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation field 'successRate' cannot be higher than 100.
questionnairePhase.title.NotEmpty.message=Questionnaire Phase field 'title' cannot be empty.
#QUESTION PHASE RELATION
questionPhaseRelation.order.NotNull.message=Question Phase Relation field 'order' cannot be null.
questionPhaseRelation.order.Min.message=Question Phase Relation field 'order' cannot be lower than 0.
questionPhaseRelation.questionIds.NotNull.message=Question Phase Relation field 'questionIds' cannot be null.
questionPhaseRelation.questionIds.Size.message=Question Phase Relation field 'questionIds' must contain at least one value.
questionPhaseRelation.questionOrders.NotNull.message=Question Phase Relation field 'questionOrders' cannot be null.
questionPhaseRelation.questionOrders.Size.message=Question Phase Relation field 'questionOrders' must contain at least one value.
questionPhaseRelation.phaseId.NotNull.message=Question Phase Relation field 'phaseId' cannot be null.
questionPhaseRelation.phaseId.Min.message=Question Phase Relation field 'phaseId' cannot be lower than 0.
questionPhaseRelation.phaseOrder.NotNull.message=Questionnaire Phase Relation field 'phaseOrder' cannot be null.
questionPhaseRelation.phaseOrder.Min.message=Question Phase Relation field 'phaseOrder' cannot be lower than 0.
questionPhaseRelation.successRate.Min.message=Question Phase Relation field 'successRate' cannot be lower than 0.
questionPhaseRelation.successRate.Max.message=Question Phase Relation field 'successRate' cannot be higher than 100.
#QUESTION
question.order.NotNull.message=Question Level field 'order' cannot be null.
question.order.NotNull.message=Question field 'order' cannot be null.
question.order.Min.message=Question field 'order' cannot be lower than 0.
question.text.NotEmpty.message=Question field 'text' cannot be empty.
question.questionType.NotNull.message=Question field 'questionType' cannot be null.
#QUESTION CHOICES
questionChoices.text.NotEmpty.message=Question field 'text' cannot be empty.
questionChoices.correct.NotNull.message=Question field 'correct' cannot be null.
questionChoices.order.NotNull.message=Question field 'order' cannot be null.
questionChoices.order.Min.message=Question field 'order' cannot be lower than 0.
questionChoice.text.NotEmpty.message=Question Choice field 'text' cannot be empty.
questionChoice.correct.NotNull.message=Question Choice field 'correct' cannot be null.
questionChoice.order.NotNull.message=Question Choice field 'order' cannot be null.
questionChoice.order.Min.message=Question Choice field 'order' cannot be lower than 0.
#QUESTION ANSWER
questionAnswer.questionId.NotNull.message=Question Answer field 'order' cannot be null.
#TRAINING PHASE
trainingPhase.id.NotNull.message=Training Phase field 'id' cannot be null.
trainingPhase.title.NotEmpty.message=Training Phase field 'title' cannot be empty.
......@@ -37,13 +41,14 @@ trainingPhase.allowedCommands.NotNull.message=Training Phase field 'allowedComma
trainingPhase.allowedCommands.Min.message=Training Phase field 'allowedCommands' cannot be lower than 0.
trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase field 'allowedWrongAnswers' cannot be null.
trainingPhase.allowedWrongAnswers.Min.message=Training Phase field 'allowedWrongAnswers' cannot be lower than 0.
trainingPhase.decisionMatrix.NotEmpty.message=Training Phase field 'decisionMatrix' cannot be empty.
#TASK
task.title.NotEmpty.message=Task field 'title' cannot be empty.
task.answer.NotEmpty.message=Task field 'answer' cannot be empty.
task.answer.Size.message=Task field 'answer' cannot have more than 50 characters.
task.content.NotEmpty.message=Task field 'content' cannot be empty.
task.solution.NotEmpty.message=Task field 'solution' cannot be empty.
task.incorrectAnswerLimit.NotEmpty.message=Task field 'incorrectAnswerLimit' cannot be empty.
task.incorrectAnswerLimit.NotNull.message=Task field 'incorrectAnswerLimit' cannot be null.
task.incorrectAnswerLimit.Min.message=Task field 'incorrectAnswerLimit' cannot be lower than 0.
task.incorrectAnswerLimit.Max.message=Task field 'incorrectAnswerLimit' cannot be higher than 100.
task.sandboxChangeExpectedDuration.Min.message=Task field 'sandboxChangeExpectedDuration' cannot be lower than 0.
......
......@@ -6,28 +6,32 @@ phase.order.NotNull.message=Phase pole 'order' nemůže být null.
phase.order.Min.message=Phase pole 'order' nemůže být menší než 0.
#QUESTIONNAIRE PHASE
questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase pole 'questionnaireType' nemůže být null.
questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation pole 'order' nemůže být null.
questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation pole 'order' nemůže být menší než 0.
questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation pole 'questionIds' nemůže být null.
questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation pole 'questionIds' must contain at least one value.
questionnairePhaseRelation.questionOrders.NotNull.message=Questionnaire Phase Relation pole 'questionOrders' nemůže být null.
questionnairePhaseRelation.questionOrders.Size.message=Questionnaire Phase Relation pole 'questionOrders' must contain at least one value.
questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation pole 'phaseId' nemůže být null.
questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation pole 'phaseId' nemůže být menší než 0.
questionnairePhaseRelation.phaseOrder.NotNull.message=Questionnaire Phase Relation pole 'phaseOrder' nemůže být null.
questionnairePhaseRelation.phaseOrder.Min.message=Questionnaire Phase Relation pole 'phaseOrder' nemůže být menší než 0.
questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation pole 'successRate' nemůže být menší než 0.
questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation pole 'successRate' nemůže být vyšší než 100.
questionnairePhase.title.NotEmpty.message=Questionnaire Phase pole 'title' nemůže být null.
#QUESTION PHASE RELATION
questionPhaseRelation.order.NotNull.message=Question Phase Relation pole 'order' nemůže být null.
questionPhaseRelation.order.Min.message=Question Phase Relation pole 'order' nemůže být menší než 0.
questionPhaseRelation.questionIds.NotNull.message=Question Phase Relation pole 'questionIds' nemůže být null.
questionPhaseRelation.questionIds.Size.message=Question Phase Relation pole 'questionIds' must contain at least one value.
questionPhaseRelation.questionOrders.NotNull.message=Question Phase Relation pole 'questionOrders' nemůže být null.
questionPhaseRelation.questionOrders.Size.message=Question Phase Relation pole 'questionOrders' must contain at least one value.
questionPhaseRelation.phaseId.NotNull.message=Question Phase Relation pole 'phaseId' nemůže být null.
questionPhaseRelation.phaseId.Min.message=Question Phase Relation pole 'phaseId' nemůže být menší než 0.
questionPhaseRelation.phaseOrder.NotNull.message=Question Phase Relation pole 'phaseOrder' nemůže být null.
questionPhaseRelation.phaseOrder.Min.message=Question Phase Relation pole 'phaseOrder' nemůže být menší než 0.
questionPhaseRelation.successRate.Min.message=Question Phase Relation pole 'successRate' nemůže být menší než 0.
questionPhaseRelation.successRate.Max.message=Question Phase Relation pole 'successRate' nemůže být vyšší než 100.
#QUESTION
question.order.NotNull.message=Question Level pole 'order' nemůže být null.
question.order.Min.message=Question pole 'order' nemůže být menší než 0.
question.text.NotEmpty.message=Question pole 'text' nemůže být prázdné.
question.questionType.NotNull.message=Question pole 'questionType' nemůže být null.
#QUESTION CHOICES
questionChoices.text.NotEmpty.message=Question pole 'text' nemůže být prázdné.
questionChoices.correct.NotNull.message=Question pole 'correct' nemůže být null.
questionChoices.order.NotNull.message=Question pole 'order' nemůže být null.
questionChoices.order.Min.message=Question pole 'order' nemůže být menší než 0.
questionChoice.text.NotEmpty.message=Question pole 'text' nemůže být prázdné.
questionChoice.correct.NotNull.message=Question pole 'correct' nemůže být null.
questionChoice.order.NotNull.message=Question pole 'order' nemůže být null.
questionChoice.order.Min.message=Question pole 'order' nemůže být menší než 0.
#QUESTION ANSWER
questionAnswer.questionId.NotNull.message=Question Answer pole 'order' nemůže být prázdné.
#TRAINING PHASE
trainingPhase.id.NotNull.message=Training Phase pole 'id' nemůže být null.
trainingPhase.title.NotEmpty.message=Training Phase pole 'title' nemůže být prázdné.
......@@ -37,13 +41,14 @@ trainingPhase.allowedCommands.NotNull.message=Training Phase pole 'allowedComman
trainingPhase.allowedCommands.Min.message=Training Phase pole 'allowedCommands' nemůže být menší než 0.
trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase pole 'allowedWrongAnswers' nemůže být null.
trainingPhase.allowedWrongAnswers.Min.message=Training Phase pole 'allowedWrongAnswers' nemůže být menší než 0.
trainingPhase.decisionMatrix.NotEmpty.message=Training Phase pole 'decisionMatrix' nemůže být prázdné.
#TASK
task.title.NotEmpty.message=Task pole 'title' nemůže být prázdné.
task.answer.NotEmpty.message=Task pole 'answer' nemůže být prázdné.
task.answer.Size.message=Task pole 'answer' nemůže mít víc než 50 znaků.
task.content.NotEmpty.message=Task pole 'content' nemůže být prázdné.
task.solution.NotEmpty.message=Task pole 'solution' nemůže být prázdné.
task.incorrectAnswerLimit.NotEmpty.message=Task pole 'incorrectAnswerLimit' nemůže být prázdné.
task.incorrectAnswerLimit.NotNull.message=Task pole 'incorrectAnswerLimit' nemůže být prázdné.
task.incorrectAnswerLimit.Min.message=Task pole 'incorrectAnswerLimit' nemůže být menší než 0.
task.incorrectAnswerLimit.Max.message=Task pole 'incorrectAnswerLimit' nemůže být vyšší než 100.
task.sandboxChangeExpectedDuration.Min.message=Task pole 'sandboxChangeExpectedDuration' nemůže být menší než 0.
......
......@@ -6,28 +6,32 @@ phase.order.NotNull.message=Phase pole 'order' nemôže byť null.
phase.order.Min.message=Phase pole 'order' nemôže byť nižšie než 0.
#QUESTIONNAIRE PHASE
questionnairePhase.questionnaireType.NotNull.message=Questionnaire Phase pole 'questionnaireType' nemôže byť null.
questionnairePhaseRelation.order.NotNull.message=Questionnaire Phase Relation pole 'order' nemôže byť null.
questionnairePhaseRelation.order.Min.message=Questionnaire Phase Relation pole 'order' nemôže byť nižšie než 0.
questionnairePhaseRelation.questionIds.NotNull.message=Questionnaire Phase Relation pole 'questionIds' nemôže byť null.
questionnairePhaseRelation.questionIds.Size.message=Questionnaire Phase Relation pole 'questionIds' must contain at least one value.
questionnairePhaseRelation.questionOrders.NotNull.message=Questionnaire Phase Relation pole 'questionOrders' nemôže byť null.
questionnairePhaseRelation.questionOrders.Size.message=Questionnaire Phase Relation pole 'questionOrders' must contain at least one value.
questionnairePhaseRelation.phaseId.NotNull.message=Questionnaire Phase Relation pole 'phaseId' nemôže byť null.
questionnairePhaseRelation.phaseId.Min.message=Questionnaire Phase Relation pole 'phaseId' nemôže byť nižšie než 0.
questionnairePhaseRelation.phaseOrder.NotNull.message=Questionnaire Phase Relation pole 'phaseOrder' nemôže byť null.
questionnairePhaseRelation.phaseOrder.Min.message=Questionnaire Phase Relation pole 'phaseOrder' nemôže byť nižšie než 0.
questionnairePhaseRelation.successRate.Min.message=Questionnaire Phase Relation pole 'successRate' nemôže byť nižšie než 0.
questionnairePhaseRelation.successRate.Max.message=Questionnaire Phase Relation pole 'successRate' nemôže byť vyššie než 100.
questionnairePhase.title.NotEmpty.message=Questionnaire Phase pole 'title' nemôže byť null.
#QUESTION PHASE RELATION
questionPhaseRelation.order.NotNull.message=Question Phase Relation pole 'order' nemôže byť null.
questionPhaseRelation.order.Min.message=Question Phase Relation pole 'order' nemôže byť nižšie než 0.
questionPhaseRelation.questionIds.NotNull.message=Question Phase Relation pole 'questionIds' nemôže byť null.
questionPhaseRelation.questionIds.Size.message=Question Phase Relation pole 'questionIds' must contain at least one value.
questionPhaseRelation.questionOrders.NotNull.message=Question Phase Relation pole 'questionOrders' nemôže byť null.
questionPhaseRelation.questionOrders.Size.message=Question Phase Relation pole 'questionOrders' must contain at least one value.
questionPhaseRelation.phaseId.NotNull.message=Question Phase Relation pole 'phaseId' nemôže byť null.
questionPhaseRelation.phaseId.Min.message=Question Phase Relation pole 'phaseId' nemôže byť nižšie než 0.
questionPhaseRelation.phaseOrder.NotNull.message=Question Phase Relation pole 'phaseOrder' nemôže byť null.
questionPhaseRelation.phaseOrder.Min.message=Question Phase Relation pole 'phaseOrder' nemôže byť nižšie než 0.
questionPhaseRelation.successRate.Min.message=Question Phase Relation pole 'successRate' nemôže byť nižšie než 0.
questionPhaseRelation.successRate.Max.message=Question Phase Relation pole 'successRate' nemôže byť vyššie než 100.
#QUESTION
question.order.NotNull.message=Question Level pole 'order' nemôže byť null.
question.order.Min.message=Question pole 'order' nemôže byť nižšie než 0.
question.text.NotEmpty.message=Question pole 'text' nemôže byť prázdne.
question.questionType.NotNull.message=Question pole 'questionType' nemôže byť null.
#QUESTION CHOICES
questionChoices.text.NotEmpty.message=Question pole 'text' nemôže byť prázdne.
questionChoices.correct.NotNull.message=Question pole 'correct' nemôže byť null.
questionChoices.order.NotNull.message=Question pole 'order' nemôže byť null.
questionChoices.order.Min.message=Question pole 'order' nemôže byť nižšie než 0.
questionChoice.text.NotEmpty.message=Question Choice pole 'text' nemôže byť prázdne.
questionChoice.correct.NotNull.message=Question Choice pole 'correct' nemôže byť null.
questionChoice.order.NotNull.message=Question Choice pole 'order' nemôže byť null.
questionChoice.order.Min.message=Question Choice pole 'order' nemôže byť nižšie než 0.
#QUESTION ANSWER
questionAnswer.questionId.NotNull.message=Question Answer pole 'order' nemôže byť prázdne.
#TRAINING PHASE
trainingPhase.id.NotNull.message=Training Phase pole 'id' nemôže byť null.
trainingPhase.title.NotEmpty.message=Training Phase pole 'title' nemôže byť prázdne.
......@@ -37,13 +41,14 @@ trainingPhase.allowedCommands.NotNull.message=Training Phase pole 'allowedComman
trainingPhase.allowedCommands.Min.message=Training Phase pole 'allowedCommands' nemôže byť nižšie než 0.
trainingPhase.allowedWrongAnswers.NotNull.message=Training Phase pole 'allowedWrongAnswers' nemôže byť null.
trainingPhase.allowedWrongAnswers.Min.message=Training Phase pole 'allowedWrongAnswers' nemôže byť nižšie než 0.
trainingPhase.decisionMatrix.NotEmpty.message=Training Phase pole 'decisionMatrix' nemôže byť prázdne.
#TASK
task.title.NotEmpty.message=Task pole 'title' nemôže byť prázdne.
task.answer.NotEmpty.message=Task pole 'answer' nemôže byť prázdne.
task.answer.Size.message=Task pole 'answer' nemôže mať viac než 50 znakov.
task.content.NotEmpty.message=Task pole 'content' nemôže byť prázdne.
task.solution.NotEmpty.message=Task pole 'solution' nemôže byť prázdne.
task.incorrectAnswerLimit.NotEmpty.message=Task pole 'incorrectAnswerLimit' nemôže byť prázdne.
task.incorrectAnswerLimit.NotNull.message=Task pole 'incorrectAnswerLimit' nemôže byť prázdne.
task.incorrectAnswerLimit.Min.message=Task pole 'incorrectAnswerLimit' nemôže byť nižšie než 0.
task.incorrectAnswerLimit.Max.message=Task pole 'incorrectAnswerLimit' nemôže byť vyššie než 100.
task.sandboxChangeExpectedDuration.Min.message=Task pole 'sandboxChangeExpectedDuration' nemôže byť nižšie než 0.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment