mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
#3152 Observed data import. Allow only vector names with certain lenghts to be put in a standard category
This commit is contained in:
parent
93af11f934
commit
3bc595dcb2
@ -281,7 +281,9 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromEclipseTextAddress(const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress::SummaryVarCategory RifEclipseSummaryAddress::identifyCategory(const std::string& quantityName)
|
||||
{
|
||||
if (quantityName.size() == 0) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
if (quantityName.size() < 3 ||
|
||||
quantityName.size() > 8 ||
|
||||
(quantityName.size() > 5 && quantityName.size() < 8)) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
||||
QRegExp regexp("^[A-Za-z0-9_\\-]*$");
|
||||
if(!regexp.exactMatch(QString::fromStdString(quantityName))) return RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user