Sorry for
the delay, Saikiran,
In our validateFields method,
check whether the value field contains a null or empty string value for
validation. But in your case, you typed more than 1 space, so only it is not
validated properly. To resolve this issue, please refer to the code snippet and
sample link.
Using
the beforeChange event, we can handle the case where more than
1 empty string has one empty string.
let qryBldrObj: QueryBuilder = new QueryBuilder({
dataSource: employeeData,
columns: columnData,
allowValidation: true,
beforeChange: onChange
});
qryBldrObj.appendTo('#querybuilder');
……………………………………………………….
function onChange(args: any) {
if (args.type === "value" && !/[a-zA-Z]/.test(args.value)) {
args.value = "";
}
}
|
Sample link: https://stackblitz.com/edit/rmaghu?file=index.ts
Please get
back to us if you need any further assistance on this.