Comments (2)
thank you so much. It worked.
from form-validator.
I think I know what's going on. String is immutable object. So, when you do repeatPassword(controller.value)
it passes the actual value instead of reference to the value, meaning it will check password against initial value (probably empty string).
To fix it I would suggest passing TextEdigintController instead like:
extension CustomValidationBuilderRepeatPassword on ValidationBuilder {
///check if password repeated
///if password is not repeated return error message
repeatPassword(TextEditingController password) => add((value) {
if (value == null || value.isEmpty) {
return "Bu alan gereklidir";
}
if (value != password.value) {
return 'Şifreler eşleşmiyor!';
}
return null;
});
}
from form-validator.
Related Issues (20)
- Splitting required into notBlank and notNull HOT 1
- email validator pass 'test@test ' HOT 1
- url method documentation typo HOT 1
- Adding null safety? HOT 3
- Required not working
- Is there any way to get validation as bool? HOT 4
- PatternValidator's pattern param should be type of `String` rather than `Pattern`, which is ambiguous HOT 1
- Leverage validators package instead of writing our own regexp HOT 4
- Add isEmpty on required string HOT 2
- using `required()` on an `optional` field does nothing
- Always required HOT 1
- Double can be null but less then some double value in TextFormField. HOT 1
- form_validator v2.0.0 HOT 4
- Passing `ValidationBuilder()` to validator has this error HOT 3
- Add a method to add locale to the supported list (instead of using the globalLocale HOT 1
- Number input validator
- Add DropdownButtonFormField Support HOT 1
- How to add a prefix? HOT 3
- Adding new rules with custom i18n error message HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form-validator.