@@ -286,7 +286,7 @@ class FormView @JvmOverloads constructor(
286286 field : Field
287287 ) {
288288
289- val errorMandatory = " ${field.tag } is mandatory"
289+ val errorMandatory = " ${field.name } is mandatory"
290290
291291 val lengthSatisfied = maxMinLengthSatisfied(validationRule, value, field)
292292 if (lengthSatisfied != null )
@@ -331,13 +331,13 @@ class FormView @JvmOverloads constructor(
331331 validationRule.maxValue != 0 -> {
332332 val range = IntRange (validationRule.minValue, validationRule.maxValue)
333333 if (value.toInt() !in range)
334- " ${field.tag } should be between ${validationRule.minValue} and ${validationRule.maxValue} "
334+ " ${field.name } should be between ${validationRule.minValue} and ${validationRule.maxValue} "
335335 else
336336 null
337337 }
338338 validationRule.minValue > 0 -> {
339339 if (value.toInt() < validationRule.minValue)
340- " ${field.tag } cannot be less than ${validationRule.minValue} "
340+ " ${field.name } cannot be less than ${validationRule.minValue} "
341341 else
342342 null
343343 }
@@ -355,13 +355,13 @@ class FormView @JvmOverloads constructor(
355355 validationRule.maxLength != 0 -> {
356356 val range = IntRange (validationRule.minLength, validationRule.maxLength)
357357 if (value.length !in range)
358- " ${field.tag } should have characters between ${validationRule.minLength} and ${validationRule.maxLength} "
358+ " ${field.name } should have characters between ${validationRule.minLength} and ${validationRule.maxLength} "
359359 else
360360 null
361361 }
362362 validationRule.minLength > 0 -> {
363363 if (value.length < validationRule.minLength)
364- " ${field.tag } should have more characters than ${validationRule.minLength} "
364+ " ${field.name } should have more characters than ${validationRule.minLength} "
365365 else
366366 null
367367 }
0 commit comments