Solenoid valve with optocoupler and transistor

great, thanks!!

last thing, there's no problem using 12V instead instead of 10 for the gate?