Added additional data to the serializeArray()

jQuery function serializeArray() didn't handle the arrays as I expected so I modified they way they are saved. Additionally when there are files their information also are stored in the data. Finally added the code that make the validation and handle the result.