Validate field entry against a multiple value

Validate field entry against a multiple value

I am trying to validate a field entry where the value entered must be a multiple of a value.  for example:

if(input.field_value != "multiple of 10")
{
Alert "Value entered must be a multiple of 10";
}

Has anyone done this or does anyone have an idea of how to achieve this?

Thanks