December 13 2016

Jquery validation validate money method function

Tagged Under :

javascript
Jquery validation itself didn’t give money validate method function. What we can to do is write a custom method to validate the money format with regular expression.

Below is the money validate method.
jQuery.validator.addMethod(
    "money",
    function(value, element) {
        var isValidMoney = /^\d{0,4}(\.\d{0,2})?$/.test(value);
        return this.optional(element) || isValidMoney;
    },
    "Insert "
);

December 13 2016

How the get total file inside the folder

Tagged Under :

Linux
On Linux without the GUI (Gnome or KDE) if you want to know how many files inside folder, you are unable to right click and select the properties to get the number of files inside the folder.

You can use below command to get number of files inside the folder