Comments (1)
Для валидации внутренней модели нужно указать правило валидации deep: true
Например, так:
BEM.MODEL.decl('model-type-field', {
field: {
type: 'model',
modelName: 'inner-model',
validation: {
rules: {
deep: true
}
}
}
});
При валидации, если внутрення модель не прошла проверку, событие error
сработает на внешней модели.
from bem-mvc.
Related Issues (20)
- В glue.deps.js не прописаны нужные зависимость
- Два поля models-list с одним классом моделей HOT 3
- Возможность отписаться от всех событий модели
- Делать .un() в destruct-е модели
- Возможность создавать событие ошибки на поле модели HOT 4
- Не подхватываются поля с type: 'id' в модели при установке поля с type: 'model' HOT 4
- isEqual() HOT 7
- Перевести сборку на enb
- Отрефакторить глобальную подписку на события HOT 1
- Добавить возможность декларировать статические методы для моделей
- isEmpty() HOT 3
- Для i-model__utils.js не хватает зависимостей
- i-bem__dom.js меняет стандартное поведение HOT 2
- Обновление зависимостей для v2
- Добавить поддержку BH шабонизаторов
- нет провязки для textarea
- не работает биндинг селекта (v2)
- Поддержка v2
- Обновление провязки Input
- ошибка в _getValidationRules вложенной модели (v2)
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 bem-mvc.