getErrorMessage

fun getErrorMessage(ignoreUneditedFieldErrors: Boolean): String

Get the error message that would be displayed if isValid is false. Note that isValid having a value of false does not necessarily mean there will be an error message (see ignoreUneditedFieldErrors param)

Return

An error message that can be displayed to the user

Parameters

ignoreUneditedFieldErrors

If true (default value), the field has not been edited by the user and will not be considered for validation. The field is considered "edited" if focus has, at any time, left the field while it contains text