Function in JS library /* * Checks the length of a string in a grid * @param componentElemens - componentDom passed directly from the field * @param minLength - The minimum length of the field * @param maxLength - The maxium length of the field */ validateGridFieldLength: function(componentElemens, minLength, maxLength){ var isLengthOk = []; var fieldValue = null; if(componentElemens.length > 1){ for(var i = 0; i < componentElemens.length; i++){ fieldValue = componentElemens[i].firstChild.value; if((fieldValue.length >= minLength) && (fieldValue.length <= maxLength)){ isLengthOk[i] = true; } else{ isLengthOk[i] = false; } } for ( var i = 0; i < isLengthOk.length; i++) { if (!(isLengthOk[i])){ return false; } } return true; } else{ fieldValue = componentElemens[0].firstChild.value; if((fieldValue.length >= minLength) && (fieldValue.length <= maxLength)){ return true; } else{ return false; } } }, Validation call on the column in the grid return ptLibrary.validateGridFieldLength(componentDom, 0, 2000);