Sync failed with the error "A value in the request is invalid"
Source object has attribute value that exceeds the maximum character length of the target attribute in Active Directory.
You can find the maximum length for any attribute in your AD schema by using the following PowerShell script.
To use the script, save it as a .ps1 file and run it from a PowerShell terminal with the attribute's lDAPDisplayName as a parameter.
For example: .\Get-ADAttributeLength.ps1 -attributeName "MailNickName"

Example PS script:
param ([string]$attributeName = $(throw "Specify attribute name"))
$rootDSE=[ADSI]"LDAP://RootDSE"
$attribute=[ADSI]"LDAP://CN=$attributeName,CN=Schema,CN=Configuration,$($rootDSE.defaultNamingContext)"
if ($attribute.rangeUpper -eq $null) {
"no limit"
} else {
$attribute.rangeUpper
}