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();
}
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();
}
String FormAssociatedElement::validationMessage() const
{
    return customError() ? m_customValidationMessage : String();
}
bool FormAssociatedElement::valid() const
{
    bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow()
        || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError();
    return !someError;
}
Exemple #6
0
bool ValidityState::valid() const
{
    bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow()
                     || tooLong() || patternMismatch() || valueMissing() || customError();
    return !someError;
}