You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue is FormValidator.validateSingleView(this, vehicleNoEditText, simpleCallback)- Not only validate vehicleNoEditText but all the validations declared in the Activities. This also validate pucNoEditText & pucEndDateEditText.( which I don't want to validate with vehicleNoEditText, I have separate validation call for them)
FormValidator.validateSingleView(Object target, View formContainer, View targetView, Map<view, fieldinfo=""> infoMap, IValidationCallback callback) - evaluate Single View then also validate all the other declared validations and returns false.
This is worse as no error shown against the others but I can't submit Form as well.
The text was updated successfully, but these errors were encountered:
ValidationKomensky is fantastic Validator but there are 2 issues which put me off.
Issue 1 : FormValidator.validateSingleView() is not working as expected.
For Example,
I have following 3 validations on my form.
@notempty(messageId = R.string.validation_vehicle_registration,order = 1)
EditText vehicleNoEditText;
@notempty(messageId = R.string.validation_puc_number)
EditText pucNoEditText;
@DateInFuture(datePattern = "dd-MM-yyyy",allowToday = true, messageId = R.string.validation_date_in_future)
EditText pucEndDateEditText;
vehicleNoEditText is Mandatory but pucNoEditText & pucEndDateEditText are Non mandatory.
I want to validate pucNoEditText only if pucEndDateEditText is updated.
I implement this validation as below.
if(!FormValidator.validateSingleView(this, vehicleNoEditText, simpleCallback)){
isValid = false;
}
if(!StringUtils.isEmpty(pucEndDateEditText.getText().toString())){
if(FormValidator.validateSingleView(this, pucEndDateEditText, simpleCallback)){
isValid =false;
}
if(FormValidator.validateSingleView(this, pucNoEditText, simpleCallback)){
isValid =false;
}
}
Issue is FormValidator.validateSingleView(this, vehicleNoEditText, simpleCallback)- Not only validate vehicleNoEditText but all the validations declared in the Activities. This also validate pucNoEditText & pucEndDateEditText.( which I don't want to validate with vehicleNoEditText, I have separate validation call for them)
FormValidator.validateSingleView(Object target, View formContainer, View targetView, Map<view, fieldinfo=""> infoMap, IValidationCallback callback) - evaluate Single View then also validate all the other declared validations and returns false.
This is worse as no error shown against the others but I can't submit Form as well.
The text was updated successfully, but these errors were encountered: