StringValidator

Since: BlackBerry 10.1.0

#include <bb/utility/StringValidator>

To link against this class, add the following line to your .pro file: LIBS += -lbbutility

Provides validation functions on supplied text.

The StringValidator class provides helper functions that can be used to determine if a text string conforms to a specified format, or contains a particular pattern or style. For example, you can determine whether a string appears to be an email address.


Overview

Public Functions Index

StringValidator (QObject *parent=0)
virtual ~StringValidator ()

Static Public Functions Index

Q_INVOKABLE boolisEmailAddress (const QString &text)

Public Functions

StringValidator (

Creates a new instance of the StringValidator class.

Parameters
parent

The parent of the instance.

Since:

BlackBerry 10.1.0

virtual~StringValidator ()

Destructor.

Since:

BlackBerry 10.1.0

Static Public Functions

Q_INVOKABLE bool isEmailAddress (

Determines if the specified text appears to be an email address.

Note:

This function uses RFC3522 as a guide for rules on validating an email address.

Parameters
text

The text to examine to determine if it could be an email address.

Return:

true if the specified text seems to be an email address, false otherwise.

Since:

BlackBerry 10.1.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus