themisir / form-validator

Simplest form validation for flutter form widgets
https://pub.dev/packages/form_validator
MIT License
77 stars 39 forks source link

Adding has match validation #60

Closed aleemElmozogi closed 1 month ago

aleemElmozogi commented 1 month ago

Is your feature request related to a problem? Please describe.

I need a simple way to validate that two form values match (e.g., passwords) without repeating the same logic in every form.

Describe the solution you'd like

A match method in the ValidationBuilder that checks if two values match and returns a localized error message if they don't. For example, in Arabic, it should return "the values do not match" without including the specific values.

Describe alternatives you've considered

Manual Validation Logic: Implementing custom validation logic for each form field that requires matching, which adds more code duplication and maintenance overhead.

Third-Party Libraries: Using external libraries that might offer similar functionality but lack the flexibility or localization support tailored to my specific needs.