Answer the question
In order to leave comments, you need to log in
How to build an architecture with asynchrony in mind?
Asynchrony in js is both good and bad.
Let's say I make a validator that takes data and validation rules, and returns either a list of validation errors, or null (in case of success). Something like that:
validator(
data,
{
'email': ['email', 'required'],
'password': [{string: {min: 8, max: 50}}, 'required'],
'phone': [{number: {length: 11}}]
}
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question