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
Backend development requires robust data validation to protect against invalid or harmful data. With increasing application complexity, advanced, user-friendly methods are needed. Celest's strong backend foundation could be enhanced with a specialized package like ez_validator
Proposed Solution: ez_validator
ez_validator stands out as an exemplary solution for several reasons:
Simplicity and Power: Inspired by the simplicity and effectiveness of yup/joi. offers an intuitive yet powerful API for Flutter, making complex validations more accessible.
Flexibility: It supports a wide range of validations, from basic type checking to more complex, schema-based validation scenarios.
Middleware Integration:ez_validator could be seamlessly integrated as part of a middleware layer in Celest, offering a standardized way to validate data before it reaches the business logic layer.
ez_validator would help minimize the risk of errors and security vulnerabilities.
ez_validator's straightforward API could significantly reduce the time and effort required to implement complex validation logic.
How EzValidator can help
ez_validator offers a dead-simple approach to field and object schema validation tailored for Flutter. Inspired by the intuitive API of Yup, ez_validator simplifies the process of defining and enforcing data schemas within your Flutter applications.
final bodySchema =EzSchema.shape({
'name':EzValidator<String>()
.transform((value) => value.trim())
.minLength(3, 'Name must be at least 3 characters long.'),
'password':EzValidator<String>()
.minLength(8, 'Password must be at least 8 characters long.'),
'confirmPassword':EzValidator<String>().when(
'password',
(confirmValue, [ref]) =>
confirmValue == ref?['password'] ?null:'Passwords do not match',
)
})
/// Validate the coming data final errors = bodySchema.catchErrors(bodyDaya); // Example bodyDaya is a Map<String,String>
Overview
Backend development requires robust data validation to protect against invalid or harmful data. With increasing application complexity, advanced, user-friendly methods are needed. Celest's strong backend foundation could be enhanced with a specialized package like ez_validator
Proposed Solution:
ez_validator
ez_validator
stands out as an exemplary solution for several reasons:ez_validator
could be seamlessly integrated as part of a middleware layer in Celest, offering a standardized way to validate data before it reaches the business logic layer.Implementation Use Cases
Benefits to Celest
ez_validator
would help minimize the risk of errors and security vulnerabilities.ez_validator
's straightforward API could significantly reduce the time and effort required to implement complex validation logic.How EzValidator can help
ez_validator
offers a dead-simple approach to field and object schema validation tailored for Flutter. Inspired by the intuitive API of Yup,ez_validator
simplifies the process of defining and enforcing data schemas within your Flutter applications.ez_validator
handle complex validationsI look forward to further discussions on this and am eager to contribute to the implementation of this feature.
The text was updated successfully, but these errors were encountered: