Skip to content

Commit 05751a4

Browse files
committed
Hint
Hint can be function.
1 parent c2db26b commit 05751a4

File tree

1 file changed

+60
-56
lines changed

1 file changed

+60
-56
lines changed

full/schema.js

Lines changed: 60 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = {
8686
required: true,
8787
hint: "Minimum 6 characters",
8888
styleClasses: "half-width",
89-
validator: validators.string.locale({
89+
validator: validators.string.locale({
9090
fieldIsRequired: "The password is required!",
9191
textTooSmall: "Password must be at least {1} characters!"
9292
})
@@ -210,60 +210,60 @@ module.exports = {
210210
model: "",
211211
styleClasses: "alert alert-info"
212212
}, {
213-
type: "checklist",
214-
label: "CHECKLIST combobox",
215-
model: "checklistcombobox",
216-
listBox: false,
217-
values: [{
218-
name: "HTML5",
219-
value: "HTML5-123"
220-
}, {
221-
name: "Javascript",
222-
value: "Javascript-123"
223-
}, {
224-
name: "CSS3",
225-
value: "CSS3-123"
226-
}, {
227-
name: "CoffeeScript",
228-
value: "CoffeeScript-123"
229-
}, {
230-
name: "AngularJS",
231-
value: "AngularJS-123"
232-
}, {
233-
name: "ReactJS",
234-
value: "ReactJS-123"
235-
}, {
236-
name: "VueJS",
237-
value: "VueJS-123"
238-
}],
239-
}, {
240-
type: "checklist",
241-
label: "CHECKLIST listBox",
242-
model: "checklistlistbox",
243-
listBox: true,
244-
values: [{
245-
name: "HTML5",
246-
value: "HTML5-123"
247-
}, {
248-
name: "Javascript",
249-
value: "Javascript-123"
250-
}, {
251-
name: "CSS3",
252-
value: "CSS3-123"
253-
}, {
254-
name: "CoffeeScript",
255-
value: "CoffeeScript-123"
256-
}, {
257-
name: "AngularJS",
258-
value: "AngularJS-123"
259-
}, {
260-
name: "ReactJS",
261-
value: "ReactJS-123"
262-
}, {
263-
name: "VueJS",
264-
value: "VueJS-123"
265-
}],
266-
}, {
213+
type: "checklist",
214+
label: "CHECKLIST combobox",
215+
model: "checklistcombobox",
216+
listBox: false,
217+
values: [{
218+
name: "HTML5",
219+
value: "HTML5-123"
220+
}, {
221+
name: "Javascript",
222+
value: "Javascript-123"
223+
}, {
224+
name: "CSS3",
225+
value: "CSS3-123"
226+
}, {
227+
name: "CoffeeScript",
228+
value: "CoffeeScript-123"
229+
}, {
230+
name: "AngularJS",
231+
value: "AngularJS-123"
232+
}, {
233+
name: "ReactJS",
234+
value: "ReactJS-123"
235+
}, {
236+
name: "VueJS",
237+
value: "VueJS-123"
238+
}],
239+
}, {
240+
type: "checklist",
241+
label: "CHECKLIST listBox",
242+
model: "checklistlistbox",
243+
listBox: true,
244+
values: [{
245+
name: "HTML5",
246+
value: "HTML5-123"
247+
}, {
248+
name: "Javascript",
249+
value: "Javascript-123"
250+
}, {
251+
name: "CSS3",
252+
value: "CSS3-123"
253+
}, {
254+
name: "CoffeeScript",
255+
value: "CoffeeScript-123"
256+
}, {
257+
name: "AngularJS",
258+
value: "AngularJS-123"
259+
}, {
260+
name: "ReactJS",
261+
value: "ReactJS-123"
262+
}, {
263+
name: "VueJS",
264+
value: "VueJS-123"
265+
}],
266+
}, {
267267
type: "radios",
268268
label: "RADIOS",
269269
model: "radios",
@@ -319,7 +319,11 @@ module.exports = {
319319
type: "textArea",
320320
label: "Biography (textArea field)",
321321
model: "bio",
322-
hint: "Max 500 characters",
322+
hint: function (model) {
323+
if (model && model.bio) {
324+
return model.bio.length + " of max 500 characters used!";
325+
}
326+
},
323327
max: 500,
324328
placeholder: "User's biography",
325329
rows: 4,

0 commit comments

Comments
 (0)