DevArt EichJS Extender Core
From DevArt Knowledgebase
HTTP EichJS is a comprehensive library that allows you to develop web applications using Vanilla JavaScript.
Info
- Developer: DevArt Software Co.
- Contributors: Pathum Bandara Premaratne
- Latest Version: v1.0.16 @2025-06-26
- URL: https://js.devartsoftware.com/devart/extender/main/v1.0/devart.extender.min.js
Methods
ValidateFile
ValidateFile(FileControl, Rules, OnComplete); Validates upload file controller with the given validation rules.
Parameters
{Element} FileControl - File input control.
{Object[]} Rueles - Array of validation rules.
{Function} OnComplete - Callback function to be called on completion of validation. Parameter is an object with Success and Message properties.
Sample
ValidateFile(Uploader,
[
{ Name: "size", Value: 1 }, //in MB
{ Name: "type", Value: "jpg,png,jpeg,gif" },
{ Name: "ratio", Value: "16:9" },
{ Name: "dimension-min", Value: { Width: 480, Height: 270 } },
{ Name: "dimension-max", Value: { Width: 1920, Height: 1080} }
],
(Result) =>
{
let Lbl = document.getElementById("LblUploadMsg");
if (!Result.Success)
{
Lbl.innerHTML = Result.Message;
return;
}
UploadFile();
});
