Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Manual Validation

Tomáš Mlynarič edited this page Feb 19, 2017 · 2 revisions

If you want to manually validate your forms/fields, you can do it by setting up few simple things.

1) Setting up that validations never occur automatically:

ValiFi.install(this, 
	new ValiFi.Builder()
		.setErrorDelay(ValiFiErrorDelay.NEVER)
		.build()
);

2a) Checking if form/field is valid

form.isValid() or field.isValid()

2b) Show/hide errors after clicking submit

form.refreshError() or field.refreshError()

Validation is checked automatically (so method isValid() will be always updated) but errors won't be shown unless called refreshError().