in here file validate extensions are working,but the file size validate is not working,i just need file size only, resolution doesn't matter,i want to restrict max file size to 1MB
$form['photo']['file'] = array(
'#title' => t('Photo (Max size 2 MB)'),
'#type' => 'managed_file',
'#description' => t('xvxcds'),
'#default_value' => variable_get('photo', ''),
'#upload_location' => 'public://photo_images/',
'#upload_validators' => array(
'file_validate_size' => array(1024*1280*800),
'file_validate_extensions' => array('gif jpg jpeg'),
// Pass the maximum file size in bytes
), );