Playing the violin with long nails is not recommended since it will affect your ability to use the tip of your finger to play individual strings. Depending on how long the nails are, you may even touch other strings when attempting to play the violin. If you wish to play with long nails, there are a few caveats that you should keep in mind. It is possible to play the violin with long nails even though it is highly discouraged.
Utilize the bow as your normally would. The length of your fingernails will not affect your ability to use the bow.
Play the violin strings by using the pads of your finger. Keep in mind that this is awkward and will prevent you from playing difficult passages.
Perform with the tips of your fingers when playing the E string. The E string is the highest string and on the edge of the violin. Because of this, you will be able to play normally on this string.
Consider using artificial nails if you must keep your nails long. This has the advantage of being able to easily remove your fingernails when you have to play the violin.
Consider switching to the cello. The strings are farther, apart and your nails will have less of an effect on your playing.
If you play the violin professionally, you will need to make a choice between your playing and your nails. It is simply not possible to compete in a market when your fingernails are long.