# Dynamic Error msg problem

**URL:** <https://forum.kirupa.com/t/dynamic-error-msg-problem/70038>\
**Category:** flash\
**Created:** [November 10, 2004, 5:14am UTC](https://forum.kirupa.com/t/dynamic-error-msg-problem/70038 "2004-11-10T05:14:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [November 10, 2004, 5:14am UTC](https://forum.kirupa.com/t/dynamic-error-msg-problem/70038/1 "2004-11-10T05:14:27Z")

</div>

I’ve to validate a form and on the right of the screen user can see the errors. But the text field of error shows only one msg at a time … this is the code

The function is recalled on a button click and the values passed along with that… Any idea :-/

The multiline property and html property is true but still the problem exists

// error.text = “Please fill in the " + field +” field"; //this portion only shows one error msg instead of all the filed that is blank

```auto
 
String.prototype.isEmpty = function(field,min_chars){
var str = this;
if(this == ""){
error.text = "Please fill in the " + field +" field";
page_1 = false;
page_2 = false
return false;
}
else if(this.length < min_chars){
trace("The "+ field +" you entered is invalid - not enough characters.");
page_1 = false;
page_2 = false
return false;
}
page_1 = true;
return true;
}
 

```
