MAINT-6509 Viewer still allows you to create a group with leading spaces in the group name
parent
aff8dcea75
commit
373947aba3
|
|
@ -328,6 +328,15 @@ namespace LLTextValidate
|
|||
return rv;
|
||||
}
|
||||
|
||||
bool validateASCIINoLeadingSpace(const LLWString &str)
|
||||
{
|
||||
if (LLStringOps::isSpace(str[0]))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
return validateASCII(str);
|
||||
}
|
||||
|
||||
// Used for multiline text stored on the server.
|
||||
// Example is landmark description in Places SP.
|
||||
bool validateASCIIWithNewLine(const LLWString &str)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ namespace LLTextValidate
|
|||
bool validateASCIIPrintableNoPipe(const LLWString &str);
|
||||
bool validateASCIIPrintableNoSpace(const LLWString &str);
|
||||
bool validateASCII(const LLWString &str);
|
||||
bool validateASCIINoLeadingSpace(const LLWString &str);
|
||||
bool validateASCIIWithNewLine(const LLWString &str);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
|
|||
|
||||
|
||||
mGroupNameEditor = panel_group->getChild<LLLineEditor>("group_name_editor");
|
||||
mGroupNameEditor->setPrevalidate( LLTextValidate::validateASCII );
|
||||
mGroupNameEditor->setPrevalidate( LLTextValidate::validateASCIINoLeadingSpace );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue