void EmailInputType::warnIfValueIsInvalid(const String& value) const { String invalidAddress = findInvalidAddress(value); if (invalidAddress.isNull()) return; addWarningToConsole("The specified value %s is not a valid email address.", invalidAddress); }
void WeekInputType::warnIfValueIsInvalid(const String& value) const { if (value != element().sanitizeValue(value)) addWarningToConsole( "The specified value %s does not conform to the required format. The " "format is \"yyyy-Www\" where yyyy is year in four or more digits, and " "ww is 01-53.", value); }
void DateTimeLocalInputType::warnIfValueIsInvalid(const String& value) const { if (value != element().sanitizeValue(value)) addWarningToConsole( "The specified value %s does not conform to the required format. The " "format is \"yyyy-MM-ddThh:mm\" followed by optional \":ss\" or " "\":ss.SSS\".", value); }
void TimeInputType::warnIfValueIsInvalid(const String& value) const { if (value != element().sanitizeValue(value)) { addWarningToConsole( "The specified value %s does not conform to the required format. The " "format is \"HH:mm\", \"HH:mm:ss\" or \"HH:mm:ss.SSS\" where HH is " "00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.", value); } }
void RangeInputType::warnIfValueIsInvalid(const String& value) const { if (value.isEmpty() || !element().sanitizeValue(value).isEmpty()) return; addWarningToConsole( "The specified value %s is not a valid number. The value must match to " "the following regular expression: " "-?(\\d+|\\d+\\.\\d+|\\.\\d+)([eE][-+]?\\d+)?", value); }