This project is read-only.

why don't allow non A-Z chars as first letter in field

Topics: Troubleshooting
Nov 27, 2011 at 1:39 PM

I add  a field to the content type "user" with content name in Chinese, I  input two characters but only got one. I checked the code and then found this:


// don't allow non A-Z chars as first letter, as they are not allowed in prefixes 
if(name.Length > 0) {
    if (!IsLetter(name[0])) {
        name = name.Substring(1);



when I input some value to the added field( with Chinese field name), It works quit well, input is ok, showing is ok. Is there any other reason for this ? and if any,  I think remove only the first char is not a good idea.

Nov 28, 2011 at 11:18 PM

It's a technical name, not a display name. It's due to limitations of the underlying storage system.

Nov 28, 2011 at 11:21 PM

With the code dragon753 has shown, if a name had an invalid first character, it would be stripped off. Meaning that if the 2nd character was invalid, it would nevertheless now be the first character ... and dragon753 is saying it still works, so maybe that limitation isn't actually there? Either way it looks like the validation has a small bug.

Nov 28, 2011 at 11:26 PM

Oh, OK, I had missed that. Please file a bug.

Nov 29, 2011 at 3:15 AM