simple-schema

    0熱度

    1回答

    我剛剛安裝了mpowaga:autoform-summernote。它在說明中要對服務器上的HTML進行消毒併發送給您,以安裝一個消毒軟件包。我已經安裝了djedi:sanitize-html但是我找不到有關如何將其與autoform和simple-schema集成/使用的說明。我假設我想在模式中定義它。我是一個小菜,所以一些指導將非常感激。 如果你想我發佈我的架構或其他東西,我可以。

    0熱度

    1回答

    我使用SimpleSchema和Collection2的流星。並作出反應。將項目插入集合時遇到了錯誤。這裏是代碼: 我的收藏和模式在recipes.js:在Methods.js import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo'; import { SimpleSchema } from 'm

    2熱度

    4回答

    爲了確保我的出版物接收的參數類型,我應該使用SimpleSchema還是check()? Meteor.publish('todos.inList', function(listId, limit) { new SimpleSchema({ listId: { type: String }, limit: { type: Number } }).valida

    1熱度

    2回答

    我有一個向前和向後按鈕的圖片庫。點擊任意一個按鈕我想插入本地數據庫中的一個條目與圖像已被查看的時間(所以我可以稍後看到哪個圖像已被查看最多)。 這工作完全沒有架構: 'click .btn-forward, click .btn-backward' (event, template) { Local.Viewed.upsert({ imageId: this._id

    1熱度

    2回答

    我是Meteor新手,想弄清楚如何最好地設計這個數據庫來存儲和發佈數據。我認爲這將是有意義的使用這些包: https://github.com/aldeed/meteor-autoform https://github.com/aldeed/meteor-simple-schema https://github.com/iron-meteor/iron-router 我不得不爲的課程列表中的集合中

    0熱度

    1回答

    我正在使用此軟件包在進入數據庫集合之前驗證數據。我的集合中的一個字段必須包含一個字符串數組 - 我如何驗證它?

    0熱度

    1回答

    我試圖用進口以訪問的對象,但我與邏輯掙扎: schemas.js: import { SimpleSchema } from 'meteor/aldeed:simple-schema'; export default UsersExtraSchema = new SimpleSchema({ ... } seed.js: import '/imports/startup/serv

    0熱度

    1回答

    我試圖通過將usersId保存到登錄用戶帳戶來創建一個最喜歡的按鈕。概念是,如果有userId(用戶是最喜歡的),否則用戶不是最喜歡的。問題是我收到錯誤update failed: Error: Favorites must be an array,我不確定這是什麼意思。 路徑:schema.js Schema.UserProfile = new SimpleSchema({ "favo

    2熱度

    2回答

    我有SimpleSchema/Collection2這樣定義的集合: Schema.Stuff = new SimpleSchema({ pieces: { type: [Boolean], }, num_pieces: { type: Number, }, 我怎樣才能得到num_pieces到自動與pieces陣列每當有變化的長

    0熱度

    1回答

    假設您正在使用流星的Simple schema程序包,並且您希望有一個屬性將爲CMS存儲text content,並且您不知道用戶有多少文本將使用simple schema中的最大屬性是什麼,以及如果我沒有設置最大屬性會發生什麼?我可以遇到有人發送1 MB文本的問題嗎?使用自定義驗證來計算文本的大小會更好嗎? myCMSSchema = new SimpleSchema({ textCo