1. A computer-implemented method comprising: receiving a document that includes a function call for a function and an input parameter to the function; identifying a source of the document that includes the function call and the input parameter, the source comprising a particular storage location; comparing the source of the document that includes the function call and the input parameter against a list of trusted sources that includes trusted storage locations to determine trustworthiness of the source by determining whether the particular storage location is included in the list of trusted sources; based on the comparing indicating that the particular storage location is not included in the list of trusted sources: accessing a validation rule associated with the function from a file that is located separately from the function; using at least one processor, validating the input parameter in the document based on the validation rule associated with the function; and calling the function based on the validation of the input parameter; and based on the comparing indicating that the particular storage location is included in the list of trusted sources, calling the function without validating the input parameter.