Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/basecomponents/validators.js

18 lines
408 B

// common validators across base components
import {chamiloIconToClass} from "./ChamiloIcons";
export const iconValidator = (value) => {
if (typeof (value) !== "string") {
return false;
}
return Object.keys(chamiloIconToClass).includes(value);
};
export const sizeValidator = (value) => {
if (typeof value !== "string") {
return false;
}
return ["normal", "small"].includes(value);
}