CoreInput form error adding
This commit is contained in:
parent
27763fc8d2
commit
c10cdb8158
6 changed files with 45 additions and 23 deletions
|
@ -25,6 +25,7 @@ declare global {
|
|||
fromArray(): number[];
|
||||
toPx(): string;
|
||||
unixFromDate(): string;
|
||||
isValid(str: string): boolean;
|
||||
}
|
||||
|
||||
interface String {
|
||||
|
|
|
@ -18,4 +18,10 @@ export const NumberExtensions = () => {
|
|||
return `${date.getUTCFullYear()}.${date.getMonth()}.${date.getDay()} ${date.getHours()}:${date.getMinutes()}`;
|
||||
};
|
||||
}
|
||||
if (Number().isValid === undefined) {
|
||||
// eslint-disable-next-line no-extend-native
|
||||
Number.prototype.isValid = function (str: string) {
|
||||
return !isNaN(Number(str));
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue