Skip to content Skip to sidebar Skip to footer

Validation By Annotations?

is there any similar to Annotation based JSF/Hibernate validation für Android? Or do I always have to 'manually' validate each input field?

Solution 1:

Actually I think he was referring to jsr-303 and its reference implementation Hibernate-Validator which could be used in Android (at least I managed to use 4.2.0.Final) if you get rid of a java.beans.Introspector dependency.

See https://hibernate.atlassian.net/browse/HV-779 and Is there a work around for the Android error "Unable to resolve virtual method java/beans/PropertyDescriptor"?

Solution 2:

What u mean by Hibernate Viladation Hibernate is different thing it is just an ORM and JSF is MVC; you can use Regular Expressions to deal with them or use

android:maxLines="5" android:maxHeight="5" android:maxLength="5" android:inputType="textEmailAddress"

or use these properties

Post a Comment for "Validation By Annotations?"