# What's new in Grid v5.4.1

## Support string as a return value of [`finalizeCellEdit`](https://bryntum.com/products/grid/docs/api/Grid/column/Column#config-finalizeCellEdit) config

The return value of the `finalizeCellEdit` function can now be a string, which will indicate an error message 
of the failed validation. This error message will be cleared upon any subsequent user input.                                                                     
                                                                                                            
For example for synchronous validation:                                                                     
                                                                                                            
```javascript                                                                                               
const grid = new Grid({                                                                                     
   columns : [                                                                                              
      {                                                                                                     
         type : 'text',                                                                                     
         text : 'The column',                                                                               
         field : 'someField',                                                                               
         flex : 1,                                                                                          
         finalizeCellEdit : ({ value }) => {                                                                
             return value.length < 4 ? 'Value length should be at least 4 characters' : true;               
         }                                                                                                  
      }                                                                                                     
   ]                                                                                                        
});                                                                                                         
```                                                                                                         
Here we've defined a validation `finalizeCellEdit` function, which marks all edits with new value less than 4 
characters length as invalid.                                                                   


<p class="last-modified">Last modified on 2023-10-26 8:19:11</p>