Michiel Meeuwissen wrote:
Nico Klasens wrote:

The head has currently a pattern on the Datatype String which makes it a little hard to upgrade some sites. The pattern is \A[^\n\r]*\z which means that no newlines are allowed in the input. There is a specialization 'field' which does allow newlines, but we haven't used that a lot in our builders. It sounds odd to me that a specialization is more lenient then its base type.

Yes, but guitype 'string' always meant that.

Hmm I didn't know that. We always created builders with guitype string and generated the editwizards fields based on the size.

I propose to make a new specialization and move the pattern to that one.

   <specialization id="line">
     <!-- no new lines -->
     <pattern value="\A[^\n\r]*\z" />
   </specialization>


I think the guitype 'string' was always used to create an input field of
one line. It's hard to imagine how one succeeded to enter newlines
there.

But anyhow, an other option would be to only add 'enforce="never"' or
'enforce="oncreate"' to the pattern of string. That means that it only
serves as an indication for the gui-editor. Just as 'guitype="string"'
always was, I think.

IMO previous version of mmbase were wrong about the String type. My option corrects this misconception and it still has the same functionality.

Nico
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to