Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.5/class-validator/esm2015/decorator/number/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.5/class-validator/esm2015/decorator/number/IsNegative.js

import { buildMessage, ValidateBy } from '../common/ValidateBy';
export const IS_NEGATIVE = 'isNegative';
/**
 * Checks if the value is a negative number smaller than zero.
 */
export function isNegative(value) {
    return typeof value === 'number' && value < 0;
}
/**
 * Checks if the value is a negative number smaller than zero.
 */
export function IsNegative(validationOptions) {
    return ValidateBy({
        name: IS_NEGATIVE,
        validator: {
            validate: (value, args) => isNegative(value),
            defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be a negative number', validationOptions),
        },
    }, validationOptions);
}
//# sourceMappingURL=IsNegative.js.map

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists