예제 #1
0
String HTMLTextAreaElement::validationMessage() const
{
    if (!willValidate())
        return String();

    if (customError())
        return customValidationMessage();

    if (valueMissing())
        return validationMessageValueMissingText();

    if (tooLong())
        return validationMessageTooLongText(computeLengthForSubmission(value()), maxLength());

    return String();
}
String HTMLTextAreaElement::validationMessage() const
{
    if (!willValidate())
        return String();

    if (customError())
        return customValidationMessage();

    if (valueMissing())
        return locale().queryString(WebKit::WebLocalizedString::ValidationValueMissing);

    if (tooLong())
        return locale().validationMessageTooLongText(computeLengthForSubmission(value()), maxLength());

    return String();
}
예제 #3
0
String HTMLTextAreaElement::validationMessage() const {
  if (!willValidate())
    return String();

  if (customError())
    return customValidationMessage();

  if (valueMissing())
    return locale().queryString(WebLocalizedString::ValidationValueMissing);

  if (tooLong())
    return locale().validationMessageTooLongText(value().length(), maxLength());

  if (tooShort())
    return locale().validationMessageTooShortText(value().length(),
                                                  minLength());

  return String();
}