コード例 #1
0
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);
}
コード例 #2
0
ファイル: WeekInputType.cpp プロジェクト: mirror/chromium
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);
}
コード例 #3
0
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);
}
コード例 #4
0
ファイル: TimeInputType.cpp プロジェクト: mirror/chromium
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);
  }
}
コード例 #5
0
ファイル: RangeInputType.cpp プロジェクト: ollie314/chromium
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);
}