Create custom error

If you like to have a custom error message you need to add a "Custom Error Message" in your question.

Ofcourse you need to have some of answer control as well to display the error when the condition is wrong.

NOTE about Decimals Error

The "Input format" error is triggered from the backend, because the format for the question cannot hold the data (number of digits) entered. 

The error message you can not override (when it has been allowed to pass through your answer control). 

The "Error message" element, override the standard error messages that is generated when the value does not pass the answer control that you have used. 

For example if your answer control just has "Answer required", a value like 1234.6789 passes this control, and the backend message is then triggered. However if you instead make sure that your answer control picks catches this, the "custom error" will be displayed. Due to historic reasons, and the "." is used for other syntax elements, if you have a field of total 4 digits and 2 decimals, in the answer control you treat this as a 4 digit number. 

So for example to limit e.g. 0.00 to 2.99 answer control should be 0:299, to limit 0.00 to 99.99 the answer control should be 0:9999.

So when using this, you have to make sure that the format, total digits and number of decimals, match your answer control, and the number of decimals you set for the sum.

NOTE about Translation

When you create an error message which comes from custom validation scripts on the page itself (through included Javascript code). You must make sure that the Javascript also checks the language and creates the custom validation message in whatever language is appropriate (if you have several languages).

NOTE about System Error

For example, we have a numeric question and set the max. to 5 digits (and without answer control). 

When the user enters more than 5 digits a system error occurs. These error messages are not translated and a custom error will not override this message. 

So if you have e.g. 5 digits, and you want people to be able to answer up to 5 digits, but also allow them not to answer, you should set an answercontrol of: "(-)|(0:99999)" (meaning "-" is no answer required, and 0:99999 restricts to 5 digits). Then they will get the custom error or the translated ones.