validatorjs number

JavaScript
const validationRule = 'required|numeric';
Source

Also in JavaScript: