Questions tagged [saripaar]

Saripaar is a simple, yet powerful rule-based UI validation library for Android.

Saripaar is a simple, yet powerful rule-based UI validation library for Android featuring:

  • Declarative style validation powered by annotations
  • Extensible
  • Synchronous and asynchronous validations (without having to worry about threading)
  • Works with stock Android widgets - no custom view dependencies
  • Quick setup (JAR package)
  • Isolates validation logic using rules
  • Compatible with other annotation frameworks such as AndroidAnnotations, RoboGuice, etc.

https://github.com/ragunathjawahar/android-saripaar

31 questions
13
votes
1 answer

Adding a custom annotation to Android Saripaar

I just started using android saripaar library for a client's app. I wanted to add a custom validation for a field. However, there doesn't seem to be a way to create a custom annotation. I have to manually put in rule in the validator. How do I…
Amit
  • 3,952
  • 7
  • 46
  • 80
12
votes
3 answers

Android 6 EditText.setError not working correctly

I have upgraded to android 6 and seeing some strange things when trying to set validation for some editTexts. I am using android-saripaar for validation: @Email(messageResId = R.string.error_email) private EditText email; @Password(min = 6, scheme =…
11
votes
1 answer

Saripaar formvalidation not working second time in kotlin

I am using saripaar for form validation. I have some edittext in fragmentA, on validation success , view will be switched to fragmentB. Butterknife and saripaar annotation in fragment. @NotEmpty @BindView(R.id.nameEditText) lateinit var…
captaindroid
  • 2,868
  • 6
  • 31
  • 45
10
votes
3 answers

Drawable right in edit text not updating after error

Edit text in android doesn't allow to change draw able after setError. I have used drawable right for password field but if error comes in password field it won't allow to change draw able after it. before error it works fine.
Wasim K. Memon
  • 5,979
  • 4
  • 40
  • 55
6
votes
1 answer

Android : Saripaar Validation Library. Need to set error message from strings.xml

I am using the the Saripaar validation library https://github.com/ragunathjawahar/android-saripaar to validate one of the forms. The library is pretty useful as it avoids a lot of boilerplate code for validating a form. However, the library uses…
Viren
  • 105
  • 2
  • 10
5
votes
1 answer

How to recheck field in android-saripaar?

I use the android-saripaar library. I can check all the EditText fields on the correctness of the entered data using validate(). If I fill the EditText on with a mistake in correct data, the error doesn't disappear as long as I again call a…
Mark Korzhov
  • 2,109
  • 11
  • 31
  • 63
4
votes
0 answers

How to add Saripaar Validator in code and not as attribute?

As explained on official GitHub page adding validators through attributes is easy as: @NotEmpty @Email private EditText email; Now that EditText will be validated that it's not empty and that it contains email. But, now, how can I can add those two…
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
4
votes
0 answers

Using saripaar in DialogFragment

I want use saripaar in DialogFragment. consider this code: builder.setView(view); Dialog dialog = builder.create(); Button register_button = (Button) view.findViewById(R.id.btn_register_send_data); register_button.setOnClickListener(new…
4
votes
0 answers

Android-saripaar,how to identify different widget validation

Android-saripaar,how to identify different widget validation I have two buttons in my class both have different validation, how can I identify that onValidationSucceded() which widget's callback returns
user2028
  • 163
  • 4
  • 15
  • 40
3
votes
3 answers

Spinner Validation using android saripaar

How can I validate my Spinner Android Saripaar? I have declared my Spinner in the following manner. @Select(order = 8) Spinner spin_country; and this is my onValidationFailed() method. @Override public void onValidationFailed(View failedView,…
Riju Thomas
  • 49
  • 1
  • 5
3
votes
1 answer

Saripaar Caused by: java.lang.NoSuchFieldException: LONG

Hi i have problem with my release version where I use proguard. In debug everything works fine. When I try to Call: validator.validate(); they throw: java.lang.NoSuchFieldError at…
AresM
  • 51
  • 3
1
vote
0 answers

Android Saripaar-v2 OR annotation

So I have a field: @NotEmpty @Email @Or @Pattern(regex = "\\+?64(\\d{8,10})") private EditText mETUser; Basically, what I'm after is: The field can't be empty and must contain either a valid email OR a valid phone number (the Pattern.) The OR…
Kraiden
  • 567
  • 3
  • 18
1
vote
0 answers

How can I use AppCompatEditText with Saripaar validation library

So currently it shows the error icon on the AppCompatEditText with invalid entry on validation but when I click on that view it throws an exception. android.view.InflateException: Binary XML file line #17: Error inflating class TextView
Rahul Thakur
  • 824
  • 1
  • 12
  • 27
1
vote
1 answer

How do you make a field an email field not required in Android Saripaar?

I have a simple form in my Android app that I am using Android Saripaar to validate, one of the fields is an email address and according to the first example in the docs it should look something like this: @NotEmpty @Email private EditText…
grrrrrr
  • 1,395
  • 12
  • 29
1
vote
1 answer

Saripaar validation Android, multiple forms

I have 3 forms in a same activity (and layout) that I want validate using saripaar. This validates the three forms, but they dont validate independently. This the layout: Form1: Input for email and submit button. Form2: Input for a validation code…
Genaut
  • 1,810
  • 2
  • 29
  • 60
1
2 3