node-red/node-red — pull request #127 by fvdpol (2013-12-24 19:42:56+00:00)
Title: Add validation logic to the Change Node editor + improvement of error logging on invalid regular expressions for the engine

This change adds input validation to the gui of Change Nodes to prevent the user from unintentionally entering an invalid regular expression (in case the ‘use regular expressions’ option is enabled).

The user will be notified (using the RED notification mechanism) on the specific error code to help resolve the issue.

![screen shot 2013-12-24 at 20 38 15](https://f.cloud.github.com/assets/1499454/1807128/43eb55ba-6cd3-11e3-826a-b9e9a92d2975.png)

Logging for the Change node engine has been improved for erratic regular expressions more verbose to help identification and resolving of the configuration issue:

eg.:
```
old: 24 Dec 18:40:09 - [error] [change:Strip kW] Invalid regex: *kW
new: 24 Dec 18:40:09 - [error] [change:Strip kW] Invalid regular expression: /*kW/: Nothing to repeat

old: 24 Dec 20:15:57 - [error] [change:Strip kW] Invalid regex: *kW
new: 24 Dec 20:15:57 - [error] [change:Strip kW] Invalid regular expression: /[kW/: Unterminated character class
```