View source on GitHub |
Raises an exception if the value is not a valid string or a subclass thereof.
google.appengine.api.datastore_types.ValidateString(
value,
name='unused',
exception=google.appengine.api.datastore_errors.BadValueError
,
max_len=_MAX_STRING_LENGTH,
empty_ok=False
)
A string is valid if it's not empty, no more than _MAX_STRING_LENGTH
bytes,
and not a Blob. The exception type can be specified with the exception
argument; it defaults to BadValueError
.
Args | |
---|---|
value
|
The value to validate. |
name
|
The name of this value; used in the exception message. |
exception
|
The type of exception to raise. |
max_len
|
The maximum allowed length, in bytes. |
empty_ok
|
Allow empty value. |