Add validation and size parameter.